472,371 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

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 21902


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: cgbusch | last post by:
"Character reference "&#c" is an invalid XML character" With JDOM and Xerces in Java, I get the above error with sequences. I need to be able to encode arbitrary char sequences in xml. any...
3
by: Kaidi | last post by:
Hello guys, I get the "an invalid XML character" error when using xerces to parse a XML file. I know that XML will correspond the &, <, >, " to special strings like "&gt;&lt;". However, how about if the...
6
by: Marco Montel | last post by:
I have two applications that should comunicate through an xml file. This xml will contain a CDATA section with a digital signature. The problem is that the digital signature is composed of...
9
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones...
3
by: Gabriele Poggi | last post by:
How can I load an xml document, with some invalid character, with the method doc.load(), without exceptions? I have already tried to insert a CDATA Sections in the xml file source, but the result...
1
by: King Kong | last post by:
we are facing this kind of error when we double click the infragistic web grid please help me on this Regards Moid Iqbal Server Error in '/NetworkAccess' Application....
2
by: none | last post by:
Hi, I'm opening a popup window with JavaScript. It has a command button. This is from the primary source (opener) window: ###################################################################...
2
by: sachinik19 | last post by:
Hi, We are using SAXParser (xerces) for parsing an xml with utf-8 encoding. For some special character it gives SAXException with error message - "The invalid character is found in the document...
1
by: =?Utf-8?B?UGF1bCBQaGlsbGlwcw==?= | last post by:
I have read many things about this but I haven't got a clear vision on what to do if anything about this. I have a system that tries to find holes in my web site. One of the things it has...
1
by: eBob.com | last post by:
I have some code which is trying to determine where text will wrap in a custom text box (which Inherits from Control). It determines the number of characters which will fit in the first line, but...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.