equal sign in value portion of xml tag

Discussion in 'XML' started by johndesp, Jan 19, 2004.

  1. johndesp

    johndesp Guest

    I am building an xml document to represent a url request. Some urls
    contain d equal signs appended to the url. Its important I preserve
    the equal sign in hte xml document. However, my parser is giving me
    errors when attempting to parse this document.

    <url>http://www.whatever.com/techexec/techout.nsf/home.htm?openform&login=1</url>

    How can I use an equal sign in value part of an element as original
    text?

    thanks
     
    johndesp, Jan 19, 2004
    #1
    1. Advertising

  2. johndesp wrote:

    > I am building an xml document to represent a url request. Some urls
    > contain d equal signs appended to the url. Its important I preserve
    > the equal sign in hte xml document. However, my parser is giving me
    > errors when attempting to parse this document.
    >
    > <url>http://www.whatever.com/techexec/techout.nsf/home.htm?openform&login=1</url>
    >
    > How can I use an equal sign in value part of an element as original
    > text?


    I don't think it is the = sign, it is the ampersand &, you need to
    escape that in XML as
    &amp;
    It shouldn't hurt you if you transform the <url>...</url> element to
    some HTML
    <a href="...">

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jan 19, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shruds
    Replies:
    1
    Views:
    836
    John C. Bollinger
    Jan 27, 2006
  2. Jimmy
    Replies:
    1
    Views:
    950
    Cowboy \(Gregory A. Beamer\)
    Nov 21, 2006
  3. joesplink
    Replies:
    12
    Views:
    1,674
    Alan Wood
    Jul 5, 2007
  4. Stefan
    Replies:
    4
    Views:
    135
    comp.llang.perl.moderated
    Jan 2, 2008
  5. Jimmy
    Replies:
    3
    Views:
    2,416
    shimmyshack
    Nov 20, 2006
Loading...

Share This Page