upper ascii in XML

A

Arne

What is the proper way to inserting uppe ascii into an xml node
<![CDATA[<firstName>â</firstName>]]>
causes an error in IE 8
 
M

Martin Honnen

Arne said:
What is the proper way to inserting uppe ascii into an xml node
<![CDATA[<firstName>â</firstName>]]>
causes an error in IE 8

XML builds on and supports Unicode so I don't see why you would get a
problem if you use such characters in a properly encoded UTF-8 or UTF-16
document. You could even use other encodings that IE or the XML parser
you want to use supports as long as you have an XML declaration
declaring that encoding.

If you still need help then please state exactly which error you get and
if that XML document is online please post a URL.
If you use code to insert "into an xml node" then please show us the
exact code.
 
A

Arne

An invalid character was found in text content. Error processing resource
'http://ndpsw2kdw1:3333/resourcelocator/contact/s...

<firstName>

<?xml version="1.0" ?>
<contacts customerNumber="1130577">
<contact id="159" contactType="SALES REP">
<businessPhone>321-242-2055</businessPhone>
<cellPhone></cellPhone>
<homePhone></homePhone>
<emailAddress>[email protected]</emailAddress>
<fullName>Bob Comparato</fullName>
<firstName>â</firstName>
<middleInitial></middleInitial>
<lastName></lastName>
<address address1="1316 BERRI PATCH PL STE 6" address2="" address3=""
address4="" city="MELBOURNE" stateCode="FL" postalCode="32935-5523" />

<collateralitem filename=""/>
</contact>
</contacts>

Unfortunately my database is not designed with unicode support.
That is why I am couting on upper ASCII.


--
Certified Geek, Professional Data Dude
(Doing classic ASP to get paid, and WPF for fun.)


Martin Honnen said:
Arne said:
What is the proper way to inserting uppe ascii into an xml node
<![CDATA[<firstName>â</firstName>]]>
causes an error in IE 8

XML builds on and supports Unicode so I don't see why you would get a
problem if you use such characters in a properly encoded UTF-8 or UTF-16
document. You could even use other encodings that IE or the XML parser
you want to use supports as long as you have an XML declaration
declaring that encoding.

If you still need help then please state exactly which error you get and
if that XML document is online please post a URL.
If you use code to insert "into an xml node" then please show us the
exact code.
 
M

Martin Honnen

Arne said:
An invalid character was found in text content. Error processing resource
'http://ndpsw2kdw1:3333/resourcelocator/contact/s...

<firstName>

<?xml version="1.0" ?>
<contacts customerNumber="1130577">
<contact id="159" contactType="SALES REP">
<businessPhone>321-242-2055</businessPhone>
<cellPhone></cellPhone>
<homePhone></homePhone>
<emailAddress>[email protected]</emailAddress>
<fullName>Bob Comparato</fullName>
<firstName>â</firstName>
<middleInitial></middleInitial>
<lastName></lastName>
<address address1="1316 BERRI PATCH PL STE 6" address2="" address3=""
address4="" city="MELBOURNE" stateCode="FL" postalCode="32935-5523" />

<collateralitem filename=""/>
</contact>
</contacts>

It is not possible to tell from a newsgroup posting how that file is
encoded. Make sure it is UTF-8 encoded or UTF-16 encoded (and has a BOM)
or make sure the file has an XML declaration with the encoding e.g.
<?xml version="1.0" encoding="ISO-8859-1"?>
where ISO-8859-1 is just an example, I don't know the encoding.
 
A

Arne

encoding="ISO-8859-1" seems have taken care of my problem.
Upper ascii are now displayed
Thanks.
 

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

Top