此为 Mathematica 8 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)

ExpressionML (.xml)

MIME type: text/xml
Mathematica ExpressionML format.
Represents an arbitrary Mathematica expression as XML.
Used for the exchange of general expressions between Mathematica and other applications.
Plain text file, normally encoded as UTF-8.
Developed in 2002 by Wolfram Research.
  • Import imports an ExpressionML file and returns an expression.
  • Export exports an arbitrary expression to XML.
  • Import["file.xml"] reads an XML file that holds ExpressionML data and converts it to the corresponding Mathematica expression.
  • When reading XML, Import automatically recognizes the ExpressionML format. Generic XML content will be imported as an XMLObject expression.
  • Export["file.xml", expr, "ExpressionML"] converts an arbitrary Mathematica expression to the corresponding ExpressionML data structure and writes it to an XML file.
  • Export["file.xml", XMLObject[...]] converts a symbolic XML expression to generic XML.
  • Import imports the specified element from an ExpressionML file.
  • Import imports multiple elements.
  • The import format can be specified with Import["file", "ExpressionML"] or Import.
  • Export creates an ExpressionML file by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • The export format can be explicitly specified in the form Export["file", expr, "ExpressionML"] or Export.
  • See the reference pages for full general information on Import and Export.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties and settings
  • Data representation elements:
"Boxes"ExpressionML typeset as a Mathematica box expression
"Expression"arbitrary Mathematica expression
"HeldExpression"unevaluated expression
"XMLObject"ExpressionML as a symbolic XML expression
"XMLElement"nested XMLElement objects
Convert a mathematical expression to the ExpressionML format:
Import automatically recognizes the ExpressionML format when reading XML data:
Show the available Import elements:
Convert ExpressionML to an evaluated expression:
Import without evaluating:
Convert ExpressionML to a Mathematica typesetting expression:
Import ExpressionML to a complete symbolic XML expression:
Import ExpressionML to a symbolic XML fragment:
Convert a mathematical expression to the ExpressionML format:
In[1]:=
Click for copyable input
Out[1]=
Import automatically recognizes the ExpressionML format when reading XML data:
In[2]:=
Click for copyable input
Out[2]=
Show the available Import elements:
In[3]:=
Click for copyable input
Out[3]=
Convert ExpressionML to an evaluated expression:
In[4]:=
Click for copyable input
Out[4]=
Import without evaluating:
In[5]:=
Click for copyable input
Out[5]=
Convert ExpressionML to a Mathematica typesetting expression:
In[6]:=
Click for copyable input
Out[6]=
Import ExpressionML to a complete symbolic XML expression:
In[7]:=
Click for copyable input
Out[7]=
Import ExpressionML to a symbolic XML fragment:
In[8]:=
Click for copyable input
Out[8]=