OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Converting other data formats to XML, where the other data formats allow control characters


People are converting JSON to XML. People are converting JPEG2000 to XML. How are they handling characters that are allowed in JSON and JPEG2000 but are not allowed in XML?


Depends which people - an awful lot of these converters are very pragmatic, they don't tell you what happens in edge cases and when you try it out they either crash or produce invalid XML.

The json-to-xml() conversion function in XPath 3.1 gives you the option of keeping the invalid characters in JSON-escaped form (as "\u0000"), or replacing them with xFFFD, or calling a user-supplied fallback function to decide what to do with them.

Michael Kay

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS