XML/DOM serialization: Difference between revisions

Content deleted Content added
Bartj (talk | contribs)
Added Bracmat example
Lingo added
Line 626:
 
</lang>
 
=={{header|Lingo}}==
Code based on Flash Xtra (comes with Director, i.e. "built-in") that allows to use AS2/AS3 classes in Lingo (in this case "XML" is an AS2 class).
<lang lingo>-- create an XML document
doc = newObject("XML", "<?xml version='1.0' ?>")
 
root = doc.createElement("root")
doc.appendChild(root)
 
element = doc.createElement("element")
root.appendChild(element)
 
textNode = doc.createTextNode("Some text here")
element.appendChild(textNode)
 
put doc.toString()
-- "<?xml version='1.0' ?><root><element>Some text here</element></root>"</lang>
 
=={{header|Lua}}==