RawXML["string"]
represents a raw string fragment of XML that can be used inside a SymbolicXML expression.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
XML`
XML`
RawXML
RawXML["string"]
represents a raw string fragment of XML that can be used inside a SymbolicXML expression.
Details and Options
- To use RawXML, you first need to load the XML Package using Needs["XML`"].
Examples
Basic Examples (1)
Needs["XML`"]rawFragment = ExportString[1, "MathML", "Annotations" -> {}, "Formats" -> "PresentationMathML"]A composed SymbolicXML expression with an embedded fragment of RawXML:
composedFragment = XMLElement["p", {}, {RawXML @ rawFragment}]The composite expression exports as XML:
ExportString[composedFragment, "XML"]The composite expression and variants are recognized as SymbolicXML:
SymbolicXMLQ @ composedFragmentUsing ToSymbolicXML expands any RawXML fragments into SymbolicXML fragments, if possible:
ToSymbolicXML @ composedFragmentToSymbolicXML @ RawXML @ rawFragment