Programming-Idioms

Implementation
Python

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import "encoding/xml"
import "io/ioutil"
buffer, err := ioutil.ReadFile("data.xml")
if err != nil {
	return err
}
err = xml.Unmarshal(buffer, &x)
if err != nil {
	return err
}
import orange.serialization._;
import orange.serialization.archives._;
import std.file;
XmlArchive archive = new XmlArchive!(char);
archive.doc.parse(read("data.xml"));
Serializer ser = new Serializer(archive);
ser.deserialize(x);
use XML::LibXML qw();
my $x = XML::LibXML->load_xml(
location => 'data.xml');
using System.Xml.Linq;
XDocument x = XDocument.Load("data.xml");