Invalid XML character

Discussion in 'XML' started by Mark, Aug 18, 2004.

  1. Mark

    Mark Guest

    Hello,

    I'm doing some data manipulation using an XML parser and am getting the
    following error message:

    Character reference "&#22" is an invalid XML character.

    Any thoughts upon what this character could be? I've looked at all instances
    of "22" and "#" in the data I've got and can't find any obviously wrong with
    any of them.

    I'm guessing it's a rogue control character or similar somewhere, but I'd be
    grateful if someone could identify what it is I should be looking for!

    Thanks in advance,

    Mark
     
    Mark, Aug 18, 2004
    #1
    1. Advertising

  2. Mark wrote:
    > I'm doing some data manipulation using an XML parser and am getting the
    > following error message:
    >
    > Character reference "&#22" is an invalid XML character.
    >
    > Any thoughts upon what this character could be? I've looked at all instances
    > of "22" and "#" in the data I've got and can't find any obviously wrong with
    > any of them.
    >
    > I'm guessing it's a rogue control character or similar somewhere, but I'd be
    > grateful if someone could identify what it is I should be looking for!


    XML 1.0 excludes certain control characters and  is one of those, see
    http://www.w3.org/TR/REC-xml/#charsets
    This has changed in XML 1.1, see
    http://www.w3.org/TR/xml11/#charsets
    but so far most parsers only support XML 1.0.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Aug 18, 2004
    #2
    1. Advertising

  3. Mark

    Mark Guest

    > XML 1.0 excludes certain control characters and  is one of those, see
    > http://www.w3.org/TR/REC-xml/#charsets
    > This has changed in XML 1.1, see
    > http://www.w3.org/TR/xml11/#charsets
    > but so far most parsers only support XML 1.0.


    I see. Any idea where I could find the ASCII equivalent of &#22? (I need to
    amend a script so that this control character is removed whilst I'm
    importing this data)

    Thanks,

    Mark
     
    Mark, Aug 18, 2004
    #3
  4. Mark wrote:
    >>XML 1.0 excludes certain control characters and  is one of those, see
    >> http://www.w3.org/TR/REC-xml/#charsets
    >>This has changed in XML 1.1, see
    >> http://www.w3.org/TR/xml11/#charsets
    >>but so far most parsers only support XML 1.0.

    >
    >
    > I see. Any idea where I could find the ASCII equivalent of &#22? (I need to
    > amend a script so that this control character is removed whilst I'm
    > importing this data)


    If you write you are using a numeric character reference in XML
    where the number is the Unicode of the character. So the Unicode
    character with code 22 is what you are looking for and for the codes
    0..127 Unicode describes the same characters as ASCII.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Aug 18, 2004
    #4
  5. Mark

    Mark Guest

    > If you write you are using a numeric character reference in XML
    > where the number is the Unicode of the character. So the Unicode
    > character with code 22 is what you are looking for and for the codes
    > 0..127 Unicode describes the same characters as ASCII.


    Thank you very much for your help.

    Mark
     
    Mark, Aug 18, 2004
    #5
  6. In article <4123541a$0$11544$>,
    Mark <> wrote:

    >Character reference "&#22" is an invalid XML character.
    >
    >Any thoughts upon what this character could be?


    It's control-V, but the message implies that it's appearing as a character
    reference ().

    My guess is that it's a typo for " which would be a double quote
    character.

    -- Richard
     
    Richard Tobin, Aug 18, 2004
    #6
    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. cgbusch
    Replies:
    6
    Views:
    7,545
    Mike Brown
    Sep 2, 2003
  2. Kaidi
    Replies:
    3
    Views:
    5,977
    Kaidi
    Sep 27, 2004
  3. Marco Montel

    invalid XML character

    Marco Montel, Dec 7, 2004, in forum: XML
    Replies:
    6
    Views:
    10,663
    David Carlisle
    Dec 8, 2004
  4. Replies:
    2
    Views:
    4,139
    Joe Kesselman
    Jun 13, 2006
  5. kevin
    Replies:
    0
    Views:
    1,011
    kevin
    Jan 16, 2008
Loading...

Share This Page