Username: Password:

Author Topic: URL contains &  (Read 6791 times)

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
URL contains &
« on: May 09, 2010, 08:18:57 pm »
How can we enter the urls which contains & in their form in the xml services, most of them are CGI based program sites

program.cgi?SESSID=$session&FRAME=header

Because while importing the service into the GoText it gives error

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: URL contains &
« Reply #1 on: May 10, 2010, 08:01:51 am »
This is due to the general xml syntax... some chars that have special meaning in xml needs to be "escaped"..this applies at least to the following chars: & < >

If you have to write the "&" char you need to write: "&amp;".

A service is accepted in gotext if at least it is a valid xml file. You can check if a xml service is well formed (=valid xml), and have an hint of what the problem is if you make some mistake, with the Xml Validator..remember to check the "Well-Formedness only" option.

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: URL contains &
« Reply #2 on: May 10, 2010, 08:53:20 am »
Nice trick :) it worked

Is this OK if there is a space between?

<post name="login" value="Sign In" />

Because following code is not valid

<post name="login" value="Sign&nbsp;In" />

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: URL contains &
« Reply #3 on: May 10, 2010, 08:57:59 am »
Nice trick :) it worked

Is this OK if there is a space between?

<post name="login" value="Sign In" />

Because following code is not valid

<post name="login" value="Sign&nbsp;In" />

Eheh, this is tricky.. &nbsp; is an html entity that has no direct meaning in xml.
The xml parser reads an "&" character that is invalid in that position.
The solutions is to write:

<post name="login" value="Sign&amp;nbsp;In" />
 ;)

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: URL contains &
« Reply #4 on: May 10, 2010, 09:43:00 am »
mmmm not worked :( may be something else is going wrong. It stays at the login page

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: URL contains &
« Reply #5 on: May 10, 2010, 09:52:13 am »
Some other hidden inputs exist,but by adding them it goes to 404 page, so they are useless to be added, it seems it can;t find the value "Sign In" to get logged in :(

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: URL contains &
« Reply #6 on: May 10, 2010, 09:55:00 am »
Sorry, I have too few informations to be able to help you further

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: URL contains &
« Reply #7 on: May 10, 2010, 09:58:36 am »
Sorry, I have too few informations to be able to help you further

Soon I will provide more information, so if there is any input I can get help from

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: URL contains &
« Reply #8 on: May 12, 2010, 06:09:19 pm »
Javascript language is really a headache when dealing with XML and HTML :( does it have anything to do with XML ?

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: URL contains &
« Reply #9 on: May 12, 2010, 06:50:15 pm »
Javascript language is really a headache when dealing with XML and HTML :(
It can make things more difficult to us, but generally speaking only when ASP.NET or other freaky frameworks are used.

Quote
does it have anything to do with XML ?
What do you mean?

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: URL contains &
« Reply #10 on: May 13, 2010, 05:22:06 am »
I meant does XML can do something with javascript codes if the page is depending on the javascript codes?

Zydio

  • Administrator
  • Hero Member
  • *****
  • Posts: 2111
  • goText++ Desk! author
    • View Profile
    • goText++ Desk! homepage
Re: URL contains &
« Reply #11 on: May 13, 2010, 07:56:45 am »
I meant does XML can do something with javascript codes if the page is depending on the javascript codes?
XML by itself can't do anything, it is used only to describe things.
The Xml Service engine, that uses my Xml Service format to guide its execution, can do many things but not directly interpret javascript code: you have to understand what the js does,  and see if you can replicate the result using the xml.
The Xml Service standard can be extended if there is the need to, but..I don't want to add javascript processing, it would only mess up things big time..

Mip104

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: URL contains &
« Reply #12 on: May 13, 2010, 08:03:01 am »
Thanks for the clarification :) Yes you are right, adding javascript compiling engine is really a mess