![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: MSXML/UTF8 and special characters < 32 >Thread Next - Re: MSXML/UTF8 and special characters < 32 Re: MSXML/UTF8 and special characters < 32To: NULL Date: 8/1/2005 8:07:00 PM dblock wrote: > I have a store that I don't control (MAPI) and generate XML in some > schema. It encounters special characters (eg. 0x12). My question is: > what should I do? > > a) Parse every single string and strip special characters? > b) Parse every single string and manually add CDATA whenever I see one > of special characters? The character with ASCII or Unicode 18 is not allowed in XML, whether you put it into a CDATA or not. Thus if you have input data with such characters and want to convert that data to XML then you have to either strip such characters or encode them in a form that they are allowed in XML (for instance base64 encoding). What you do depends on your needs, whether you need those characters in the XML data (only encoded then) or whether you can simply throw them away as the application consuming the XML does not need them. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
