SymbolicXMLErrors[expr]
returns a list of part specifications indicating where there are errors in the SymbolicXML expression expr and a message about the nature of each error.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
XML`
XML`
SymbolicXMLErrors
SymbolicXMLErrors[expr]
returns a list of part specifications indicating where there are errors in the SymbolicXML expression expr and a message about the nature of each error.
Details and Options
- To use SymbolicXMLErrors, you first need to load the XML Package using Needs["XML`"].
- This function is intended as a utility for debugging only.
Examples
Basic Examples (1)
Needs["XML`"]A SymbolicXML expression with one small error:
symbolicXMLWithError = XMLElement["math", {"xmlns" -> "http://www.w3.org/1998/Math/MathML"}, {XMLElement["semantics", {}, {XMLElement["msup", {}, {XMLElement["mi", {}, {"x"}], XMLElement["mn", {"2"}]}], XMLElement["annotation-xml", {"encoding" -> "MathML-Content"}, {XMLElement["apply", {}, {XMLElement["power", {}, {}], XMLElement["ci", {}, {"x"}], XMLElement["cn", {"type" -> "integer"}, {"2"}]}]}]}]}];SymbolicXMLQ indicates that there is an error:
SymbolicXMLQ[symbolicXMLWithError, True]SymbolicXMLErrors returns a part specification indicating where the error occurred, and a message indicating the nature of the problem:
SymbolicXMLErrors[symbolicXMLWithError]The XMLElement only has two arguments—the list for the attributes is missing:
symbolicXMLWithError[[3, 1, 3, 1, 3, 2]]