XML/DOM serialization: Difference between revisions
Content added Content deleted
(Added Kotlin) |
No edit summary |
||
Line 715: | Line 715: | ||
<element>Some text here</element> |
<element>Some text here</element> |
||
</root></pre> |
</root></pre> |
||
=={{header|Matlab}}== |
|||
<lang Matlab>docNode = com.mathworks.xml.XMLUtils.createDocument('root'); |
|||
docRootNode = docNode.getDocumentElement; |
|||
thisElement = docNode.createElement('element'); |
|||
thisElement.appendChild(docNode.createTextNode('Some text here')); |
|||
docRootNode.appendChild(thisElement); |
|||
</lang> |
|||
Output: |
|||
<pre> xmlwrite(docNode) |
|||
ans = |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<element>Some text here</element> |
|||
</root> |
|||
</pre> |
|||
=={{header|NetRexx}}== |
=={{header|NetRexx}}== |