| XML Xdoc - easy data conversion from delimited text to XML |
|
Home Download/Install Case Studies Features Why XML Xdoc? Online Manual Pricing/Purchase FAQ CSV File Format About XML Feedback/Contact us |
XML Xdoc -encoding switchXML documents can contain binary characters such as à,ô and © but to interpret such characters correctly the XML document has to specify an appropriate encoding type. Here are some common encoding types: <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-16"?> <?xml version="1.0" encoding="windows-1252"?> <?xml version="1.0" encoding="ISO-8859-1"?> There are two common error messages which can occur if you try to open an XML document into a browser such as Internet Explorer 5 or higher. Error: An invalid character was found in text content.
Error: An invalid character was found in text content.
The solution to both these errors is to specify an appropriate encoding attribute. XML Xdoc has an -encoding switch which can be used to specify an appropriate encoding type. However when processing binary data, XML Xdoc will automatically add ISO-18859-1 as an encoding attribute if no encoding information has been specified. Command line produces this file <?xml version="1.0" encoding="ISO-18859-1" standalone="yes"?><!-- Generated by Trah XML Xdoc 2004-4-17 10:53:34 --> <document> <row> <CategoryName>Beverages</CategoryName> <Description>Soft drinks, coffees, teas, beers, and ales</Description> <ProductName>Chai</ProductName> </row> <row> <CategoryName>Confections</CategoryName> <Description>Desserts, candies, and sweet breads</Description> <ProductName>Gumbàr Gummibàrchen</ProductName> </row> <row> <CategoryName>Beverages</CategoryName> <Description>Soft drinks, coffees, teas, beers, and ales</Description> <ProductName>Côte de Blaye</ProductName> </row> </document> Note that it is essential that the flag -binary=1 is also used. |
| www.xdoc.co.uk |
| Also from Trah, StarterFile: software to autorun files from CD. | Copyright © 2001-2006 Trah® |