SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot manic's Avatar
    Join Date
    Dec 2001
    Location
    uk
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    illegal characters in XML

    I found a site which gave me 5 characters in XML which should always be escaped

    &lt;< less than&gt;> greater than&amp; &ampersand &apos;' apostrophe&quot;"quotation mark

    I think I may have found another... the # (hash) I have one XML document which always throws a wobbly over the # sign.

    anyone else ever run into this one so I can confirm it?
    Don't you just hate it when it works first time.

  2. #2
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I tried viewing this document in Mozilla Firefox, and it worked properly.

    Code:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <document><node>#1</node></document>
    Yours, Erik.
    ERIK RIKLUND :: Yes, I've been gone quite a while.

  3. #3
    SitePoint Zealot manic's Avatar
    Join Date
    Dec 2001
    Location
    uk
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Damnit, didn't think to test it like that... sorry for the lack of a brain there.

    Just tried it with IE as well, worked fine. That's weird!

    I have an XML doc which is generated at the supplier end for getting invoices. It always tells me there's an illegal character when I view the feed with IE and points to where... it displays the character as a box "□" and when I check the paper documents the box is in place of a #...

    which makes me think maybe they're doing something to the hash with is screwing it up?!?

    weird thing is as far as I can make out, only the above 5 characters need escaping?? so the box character should be ok (am I going nuts?)
    Don't you just hate it when it works first time.

  4. #4
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Europe
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Makes me think this is a character encoding issue...

  5. #5
    SitePoint Zealot manic's Avatar
    Join Date
    Dec 2001
    Location
    uk
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    narrowed it down to the "box character" being ascii char 29... which as far as I can make out is an unknown windows character.

    arranged with the hosts to remove everything less than char 32 out of the feed... should resolve future issues. (i hope)
    Don't you just hate it when it works first time.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •