XML/DOM serialization: Difference between revisions
Content added Content deleted
(Added Wren) |
|||
Line 1,217: | Line 1,217: | ||
</root></pre> |
</root></pre> |
||
=={{header|Mathematica}}== |
=={{header|Mathematica}}/{{header|Wolfram Language}}== |
||
<lang Mathematica>DOM = XMLObject["Document"][{XMLObject["Declaration"]["Version" -> "1.0","Encoding" -> "utf-8"]}, |
<lang Mathematica>DOM = XMLObject["Document"][{XMLObject["Declaration"]["Version" -> "1.0","Encoding" -> "utf-8"]}, |
||
XMLElement["root", {}, {XMLElement["element", {}, {"Some text here"}]}], {}]; |
XMLElement["root", {}, {XMLElement["element", {}, {"Some text here"}]}], {}]; |
||
ExportString[DOM, "XML", "AttributeQuoting" -> "\""]</lang> |
ExportString[DOM, "XML", "AttributeQuoting" -> "\""]</lang> |
||
{{out}} |
|||
Output: |
|||
<pre><?xml version="1.0" encoding="utf-8"?> |
<pre><?xml version="1.0" encoding="utf-8"?> |
||
<root> |
<root> |