Username: Password:

Author Topic: Edit XML  (Read 20893 times)

mohammad

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • SMS
Edit XML
« on: May 02, 2010, 12:40:18 pm »
Dear admin
i have edited one of xml files to send sms via other site
now i want to make a copy of that to a file
the only way is copy and paste text to Notepad and save there
i think it is better to put "Save to Local Disk" option to save duplicated or edited xml files

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Edit XML
« Reply #1 on: May 02, 2010, 02:28:32 pm »
Dear admin
i have edited one of xml files to send sms via other site
now i want to make a copy of that to a file
the only way is copy and paste text to Notepad and save there
i think it is better to put "Save to Local Disk" option to save duplicated or edited xml files

Do you mean that you have modified the xml service from inside goText++ Desk! , but it lacks a "save to xml file" feature?
If this is what you said, it is true, you can modify xml services from inside goText++ Desk! , but you lack some features..I didn't want to make a powerful text editor, the internal editing capability is intended to make small changes on the fly, to make bigger changes it is still better to use external editors.

By the way, if you make a new xml service and it works fine, don't forget to share it with us!

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Edit XML
« Reply #2 on: May 02, 2010, 03:15:47 pm »
I don't like that "wrapper" website that uses o2 ireland. We are not interested in services that use wrapper wesbites, and so I ask you to NOT post the service for that website.

The iran-only service instead is interesting! Is it a wrapper, or a real sms service?

If it is a real website, and your service works, and you can provide complete informations as those found on other services' official thread (complete description, available chars and messages, a brief registration help, and notes on service configuration) please write them (in a new thread) and feel free to post the xml service.

and thank you so much for debugging system
i enjoyed of that because i have no knowledge about web and html
it helped me to modify your xml file to use for other sites
I'm happy to hear that the Xml Service Debugger proved to be useful..I've made it exactly to quickly understand what's going on in a service for a new (or expert) developer, and to quickly spot problems.

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Edit XML
« Reply #3 on: May 02, 2010, 04:37:17 pm »
It is a great improvement :) congratulations
Try to write the midlet one too
I think you will be a software talent in near future :)
Good luck

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Edit XML
« Reply #4 on: May 02, 2010, 05:17:19 pm »
Zydio,

I wanted to know what do you use for editing the php files, because when I open them with text editor , on saving process, it says some thing will be missed such as ANSI codes and etc !


Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Edit XML
« Reply #5 on: May 02, 2010, 05:45:09 pm »
I ot Edit the Php files
I only use the application base on website parameters

I know you don't edit php files, that's why I asked Zydio

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Edit XML
« Reply #6 on: May 02, 2010, 07:54:55 pm »
My problem is the page is in persian language and to define sms is sent or not and login problems
Don't worry, the Xml Service format and goText++ Desk! support all kind of character sets, also Persian.
You simply need to use the proper character encoding in the xml file to write in Persian, or copy-past the text from the website in the xml.

You can inform goText++ Desk of the charset you are using in the xml with the initial
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
In this example "utf-8" encoding is declared to be used, and using it you should be able to have Persian symbols handled correctly.
Otherwise you could use "windows-1256" (in place of "utf-8"), that is the same charset used in the website.
Beware that you need to be sure that your text text editor is actually using the encoding you wrote at the beginning of the xml file: this isn't automatic, and you should change it with a menu in the editor that may be named "character set", "encoding", "character encoding"...and you have to choose the same one that you wrote in the initial declaration inside the xml.
Ok?


Dear Zydio , some of sites using Mobile number without "+" sign
but i couldn't find that type option in your list
There is no such system variable because it is a trivial operation to obtain the full number without the leading +.
If you are working with the single recipient you just need to use the following var tag (inside a page, dummy or captcha tag):
Code: [Select]
<var name="rcpt" operation="replace" original="$rcpt" search="+" replace="" />If you are using the list of recipients, or you want only the international country code, or something else...simply replace "rcpt" and "$rcpt" with another system variable.

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Edit XML
« Reply #7 on: May 02, 2010, 07:55:17 pm »
Zydio,

I wanted to know what do you use for editing the php files, because when I open them with text editor , on saving process, it says some thing will be missed such as ANSI codes and etc !
mip104 you should have opened another thread (in a different forum) as your question is about the old/midlet/php script based services.
Our php services usually use "windows-1252" encoding (that is the windows flavor of ISO-8859-1 encoding).

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Edit XML
« Reply #8 on: May 03, 2010, 05:04:18 am »
Thanks Zydio, I found the Notepad++
« Last Edit: May 03, 2010, 06:09:04 am by mip104 »

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Edit XML
« Reply #9 on: May 04, 2010, 01:56:59 pm »
Try to find this in that page:

&#1578;&#1593;&#1583;&#1575; &#1583;

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Edit XML
« Reply #10 on: May 04, 2010, 02:09:09 pm »
For what reason do you need to find that?

Are there any other English signs such as an email in that page? or such this "@shamswin.net" or your username ?
try that then

Did it add any SMSes for you, From the image it seems  that it is on -1 ?
« Last Edit: May 04, 2010, 02:11:49 pm by mip104 »

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Edit XML
« Reply #11 on: May 04, 2010, 02:29:39 pm »
But if it shows -1 on credit! it is not normal for checking it

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Edit XML
« Reply #12 on: May 04, 2010, 02:41:05 pm »
Wait wait please, let me answer.

i did that but Gotext can't see the persian words
i have attached debugger snapshot
Mohammad you're right there is a problem.
The problem is due to a bad code on shamswin website, and also to me not thinking of those who code that way.
The text encoding is not sent along with the content-type header, and this is the problem!! goText++ Desk! reads the content type header to determine the encoding.
The used instead the following tag:
Code: [Select]
<META http-equiv=Content-Type content="text/html; charset=windows-1256">
that browsers parse, and fool themselves to act as they received the information on the header.
and goText++ Desk! actually does not deal with meta tags.
I'm going to add support for this in the next release, but I'm still thinking on how to handle it best without impacting performance.

I think I should be able to provide a workaround that works in the current release...I'll post here those infos as soon as possible.

About captcha, i''ll see your examples to see can figure out or not, but if there is a help about captcha types and how to consider in xml file will be usefull
Captcha is supported.
You need to take a look at:
  • the <captcha> tag, where you  need to load the captcha image url
  • the $img_code system variable that will contain the text the user writes for the captcha
  • use some <fork> and <condition> tag to make the xml flow jump to the step after the captcha request if $img_code is not empty
the following Xml Services use captcha: ar-personal, id-indosat, it-alice, it-vodafone190sms, it-vodafone190mms

one other problem, in one of sites they have used "$" in username/password so gotext can't see that
like as ="ctl00$UserNameTextBox" and gotext consider it as "clt100"
what is solution fot that?!
This is very common in asp.net based websites, and it is actually used in all-wadja.
goText++ Desk! would parse "$UserNameTextBox" as a variable because of the dollar, and the non spaced text, and replaces the variable with its value that is...nothing, an empty string, as you've not used a such variable before.
But it is not a variable for you...You need to "escape" the dollar to have it read like a symbol, and you accomplish this with the "\" symbol, that is:
Code: [Select]
ctl00\$UserNameTextBoxOk?

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Edit XML
« Reply #13 on: May 04, 2010, 03:47:08 pm »
Ok Good luck

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: Edit XML
« Reply #14 on: May 04, 2010, 04:04:06 pm »
Thank you Zydio,
I'll try to learn more and use captcha solution
about last problem "$"  i did that
but the result for  "ctl00$UserNameTextBox"     in debugger was "ctl00%24UserNameTextBox"
i did like as "ctl00\$UserNameTextBox"
cheers
And this is the proper behavior! Browsers to the same, they urlencode (using percent encoding) data they send, as gT++Desk does.

Maybe the problem is not the field name but the content? Or somewhere else!

If you can write F?rsì from their website you need to use the charset property of the <page> tag and specify <page (...) charset="windows-1256" >, so that the data you send is properly encoded.
Dollar symbol ($) encoding doesn't change from UTF-8 (which is the default charset encoding used in gT++Desk) and windows-1256.

Or this was another website?