Invalid XML character

M

Mark

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
 
M

Martin Honnen

Mark said:
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.
 
M

Martin Honnen

Mark said:
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.
 
M

Mark

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
 
R

Richard Tobin

Mark said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top