Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
content_type( 'text/xml' );// set MIME type if serving
|
||||
|
||||
xml( '<?xml version="1.0" ?><root><element>Some text here</element></root>' );
|
||||
14
Task/XML-DOM-serialization/Lingo/xml-dom-serialization.lingo
Normal file
14
Task/XML-DOM-serialization/Lingo/xml-dom-serialization.lingo
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- 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>"
|
||||
13
Task/XML-DOM-serialization/Nim/xml-dom-serialization.nim
Normal file
13
Task/XML-DOM-serialization/Nim/xml-dom-serialization.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import xmldom
|
||||
|
||||
var
|
||||
dom = getDOM()
|
||||
document = dom.createDocument("", "root")
|
||||
topElement = document.documentElement
|
||||
firstElement = document.createElement "element"
|
||||
textNode = document.createTextNode "Some text here"
|
||||
|
||||
topElement.appendChild firstElement
|
||||
firstElement.appendChild textNode
|
||||
|
||||
echo document
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
require('XML::Simple');
|
||||
print %S'XML::Simple'.XMLout(
|
||||
:(root => :( element => 'Some text here' )),
|
||||
NoAttr => 1, RootName => '',
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue