469,328 Members | 1,316 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

Invalid XML character

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
Jul 20 '05 #1
5 21822


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/
Jul 20 '05 #2
> 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
Jul 20 '05 #3


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 &#dd; 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/
Jul 20 '05 #4
> If you write &#dd; 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
Jul 20 '05 #5
In article <41***********************@news.easynet.co.uk>,
Mark <ma****************@ukonline.co.uk.nospam> 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 &#x22; which would be a double quote
character.

-- Richard
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Marco Montel | last post: by
9 posts views Thread by Safalra | last post: by
3 posts views Thread by Gabriele Poggi | last post: by
1 post views Thread by King Kong | last post: by
2 posts views Thread by none | last post: by
2 posts views Thread by sachinik19 | last post: by
1 post views Thread by =?Utf-8?B?UGF1bCBQaGlsbGlwcw==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.