This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Add-ons & Links / XML Capabilities / Importing XML /

Entities and Validation

An XML document can contain any characters included in the Unicode character set. When importing an XML document into Mathematica, all numeric Unicode character entity references are automatically resolved into the corresponding Mathematica character.



Other entities that are not built into XML are resolved according to the rules present in the document type declaration.



In addition to simply converting an XML document to a SymbolicXML expression, Import can validate the XML data to ensure that it conforms to a content model defined by a DTD. So long as the document is well formed, a SymbolicXML expression will be returned. If the document is not valid, warning messages will be issued and the document wrapper will indicate the invalid nature of the document with the option Valid Rule False.

You can control the various aspects of how entities are treated and whether the document is validated or not by using the conversion options for the Import function. For more information, see Import Conversion Options.