ToVerboseXML[expr]
generates an equivalent SymbolicXML expression that explicitly exposes all the namespace information for elements and attributes in expr.
ToVerboseXML[expr,pattern]
exposes only namespaces that match pattern.
ToVerboseXML
ToVerboseXML[expr]
generates an equivalent SymbolicXML expression that explicitly exposes all the namespace information for elements and attributes in expr.
ToVerboseXML[expr,pattern]
exposes only namespaces that match pattern.
Details and Options
- To use ToVerboseXML, you first need to load the XML Package using Needs["XML`"].
- The following option can be given:
-
"AttributesDefaultNameSpace" "NullNameSpace" controls how attribute namespaces are expanded
Examples
Basic Examples (1)
Needs["XML`"]xml = XMLElement["foo", {{"http://www.w3.org/2000/xmlns/", "xmlns"} -> "http://www.wolfram.com", "att" -> "val"}, {}];ToVerboseXML gives explicit namespace information for elements. With the default value of "AttributesDefaultNameSpace", the namespaces of attributes are set to an empty string (""):
ToVerboseXML[xml, "AttributesDefaultNameSpace" -> "NullNameSpace"]With "AttributesDefaultNameSpace" set to "ElementNameSpace", the namespace of the enclosing element is used:
ToVerboseXML[xml, "AttributesDefaultNameSpace" -> "ElementNameSpace"]