XML/DOM serialization: Difference between revisions
Content added Content deleted
m (→{{header|Perl}}: Added name of Perl module.) |
m (Changed over to works with template) |
||
Line 11: | Line 11: | ||
=={{header|E}}== |
=={{header|E}}== |
||
{{works with|E-on-Java}} |
|||
This makes use of XML libraries provided with Java. |
This makes use of XML libraries provided with Java. |
||
Line 30: | Line 29: | ||
=={{header|JavaScript}}== |
=={{header|JavaScript}}== |
||
{{works with|Firefox|2.0}} |
|||
DOM |
DOM |
||
Line 89: | Line 87: | ||
=={{header|PHP}}== |
=={{header|PHP}}== |
||
{{works with|PHP|5}} |
|||
'''Interpreter:''' [[PHP]] 5 |
|||
<?php |
<?php |
||
$dom = new DOMDocument();//the constructor also takes the version and char-encoding as it's two respective parameters |
$dom = new DOMDocument();//the constructor also takes the version and char-encoding as it's two respective parameters |
||
Line 103: | Line 100: | ||
=={{header|Python}}== |
=={{header|Python}}== |
||
{{works with|Python|2.5}} |
|||
from xml.dom.minidom import getDOMImplementation |
from xml.dom.minidom import getDOMImplementation |
||
Line 117: | Line 113: | ||
xmlString = document.toprettyxml(" " * 4) |
xmlString = document.toprettyxml(" " * 4) |
||
'''Interpreter:''' [[Python]] 2.5 |
|||
from xml.etree import ElementTree as et |
from xml.etree import ElementTree as et |