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

ToSymbolicXML

ToSymbolicXML[expr]
converts an expression expr to an appropriate XML format and returns the result as SymbolicXML.
  • To use , you first need to load the XML Package using .
  • Use to generate SymbolicXML with no output to a file. Once the SymbolicXML is generated, you can write it to a file with Export.
  • The following option can be given:
"ExpandRawXML"Automaticwhether to convert RawXML string fragments
The expression returned in the corresponding SymbolicXML:
A notebook expression results in SymbolicXML representing ExpressionML:
can control the conversion of raw XML string segments enclosed within the wrapper:
(The default setting for the option, Automatic, is equivalent to True.)
This provides an alternative to ImportString for converting a segment of text XML to SymbolicXML:
Needs["XML`"]
The expression returned in the corresponding SymbolicXML:
In[2]:=
Click for copyable input
Out[2]=
 
Needs["XML`"]
A notebook expression results in SymbolicXML representing ExpressionML:
In[2]:=
Click for copyable input
Out[2]=
 
Needs["XML`"]
can control the conversion of raw XML string segments enclosed within the wrapper:
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
(The default setting for the option, Automatic, is equivalent to True.)
This provides an alternative to ImportString for converting a segment of text XML to SymbolicXML:
In[5]:=
Click for copyable input
Out[5]=