|
SOLUTIONS
|
XML PACKAGE SYMBOL
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.
Details and OptionsDetails and Options
- 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
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (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 »



