943,696 Members | Top Members by Rank

Ad:
Jun 28th, 2009
0

what are the invalid characters for XML?

Expand Post »
Hi,

I have an xml document with the following line:

XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. <title><![CDATA[HOME & DÉCOR]]></title>

this xml document fails in IE7 and IE8 reporting invalid charcter at the E acute. However, FF3 is able to display it correctly.

Some online sources suggest that IE is correct in identifying the invalid character.

Can anyone confirm whether this behavior is XML standard? What are the invalid characters for XML?
Last edited by jakesee; Jun 28th, 2009 at 10:50 am.
Similar Threads
Reputation Points: 21
Solved Threads: 5
Junior Poster
jakesee is offline Offline
130 posts
since Jul 2008
Jun 28th, 2009
0

Re: what are the invalid characters for XML?

Ok, I know what is wrong now,

The reason is because XML defaults to UTF-8 encoding when the encoding is not specified. This requires that the original xml file be written and saved as UTF-8 format, otherwise, the IE parser will report it as invalid character. If the XML file is encoded in another format, then it must be specified in the XML declaration.

But I have another question. my error XML file was written in Notepad++ and the encoding was in ANSI. But, the parser doesn't seem like allow "ANSI" as encoding. So which of the ISO-88xx-x encoding does "ANSI" correspond to?
Reputation Points: 21
Solved Threads: 5
Junior Poster
jakesee is offline Offline
130 posts
since Jul 2008
Jun 29th, 2009
0

Re: what are the invalid characters for XML?

mozilla browser eg firefox sarfari netscape knows
many sign eg É

for IE in xsl set
XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. <xsl:output method="xml" indent="yes" encoding="utf-16"/>


no working with cdata
use &# ;
http://www.ascii.cl/htmlcodes.htm
Helmut Hagemann
Last edited by xml_looser; Jun 29th, 2009 at 12:42 am.
Reputation Points: 16
Solved Threads: 21
Junior Poster
xml_looser is offline Offline
178 posts
since Apr 2009
Jun 29th, 2009
0

Re: what are the invalid characters for XML?

Click to Expand / Collapse  Quote originally posted by jakesee ...
Ok, I know what is wrong now,

The reason is because XML defaults to UTF-8 encoding when the encoding is not specified. This requires that the original xml file be written and saved as UTF-8 format, otherwise, the IE parser will report it as invalid character. If the XML file is encoded in another format, then it must be specified in the XML declaration.

But I have another question. my error XML file was written in Notepad++ and the encoding was in ANSI. But, the parser doesn't seem like allow "ANSI" as encoding. So which of the ISO-88xx-x encoding does "ANSI" correspond to?
look here
http://documentation.softwareag.com/...g/xphttpen.htm
Reputation Points: 16
Solved Threads: 21
Junior Poster
xml_looser is offline Offline
178 posts
since Apr 2009
Jul 5th, 2009
0

Re: what are the invalid characters for XML?

ANSI is a proper subset of any of the 8851 encodings
Reputation Points: 22
Solved Threads: 11
Junior Poster
fpmurphy is offline Offline
144 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in XML, XSLT and XPATH Forum Timeline: xslt help for links in html
Next Thread in XML, XSLT and XPATH Forum Timeline: Trouble finding correct Xpath ...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC