what are the invalid characters for XML?

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2008
Posts: 95
Reputation: jakesee is an unknown quantity at this point 
Solved Threads: 4
jakesee jakesee is offline Offline
Junior Poster in Training

what are the invalid characters for XML?

 
0
  #1
Jun 28th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 95
Reputation: jakesee is an unknown quantity at this point 
Solved Threads: 4
jakesee jakesee is offline Offline
Junior Poster in Training

Re: what are the invalid characters for XML?

 
0
  #2
Jun 28th, 2009
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?
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 44
Reputation: xml_looser is an unknown quantity at this point 
Solved Threads: 2
xml_looser xml_looser is offline Offline
Light Poster

Re: what are the invalid characters for XML?

 
0
  #3
Jun 29th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 44
Reputation: xml_looser is an unknown quantity at this point 
Solved Threads: 2
xml_looser xml_looser is offline Offline
Light Poster

Re: what are the invalid characters for XML?

 
0
  #4
Jun 29th, 2009
Originally Posted by jakesee View Post
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 95
Reputation: fpmurphy is an unknown quantity at this point 
Solved Threads: 5
fpmurphy fpmurphy is offline Offline
Junior Poster in Training

Re: what are the invalid characters for XML?

 
0
  #5
Jul 5th, 2009
ANSI is a proper subset of any of the 8851 encodings
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC