|
SOLUTIONS
|
XML 程序包 符号
ToCompactXML
generates an equivalent SymbolicXML expression that suppresses all the redundant namespace information for elements and attributes in expr.
suppresses only namespaces that match patt.
更多信息更多信息
- To use
, you first need to load the XML Package using Needs["XML`"]. - The following option can be given:
-
"AttributesDefaultNameSpace" "NullNameSpace" controls how attribute namespaces are abbreviated
范例范例打开所有单元关闭所有单元
基本范例 (1)基本范例 (1)
| In[1]:= |
XML with explicit namespace information:
| In[2]:= |
suppresses redundant namespace information for elements. Attributes in the null namespace always get compacted, regardless of the setting of
:
| In[3]:= |
| Out[3]= |
| In[4]:= |
| Out[4]= |
Attributes in the same default namespace as the element only get compacted when
is
:
| In[5]:= |
| Out[5]= |
| In[6]:= |
| Out[6]= |
Attributes in other namespaces do not get compacted:
| In[7]:= |
| Out[7]= |
| In[8]:= |
| Out[8]= |
If the namespace of a tag is explicit but different from the default, attributes will not be compacted:
| In[9]:= |
| Out[9]= |
The default namespace may be inherited from containing tags:
| In[10]:= |
| Out[10]= |
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »



