XML::LibXML#

📦 max

XML::LibXML - the DOM, XPath and SAX interface to libxml2.

use XML::LibXML;

my $doc = XML::LibXML->load_xml(string => '<d:multistatus xmlns:d="DAV:"/>');
my $root = $doc->documentElement;
print $root->namespaceURI, " ", $root->localname, "\n";   # DAV: multistatus
my $resp = $doc->createElementNS('DAV:', 'd:response');
$root->appendChild($resp);
print $doc->toString;

This is a native implementation of the CPAN distribution XML-LibXML 2.0213, over pperl’s XML engine, libxml2 2.15 or newer; its Perl modules are used unchanged. The module fails to load with a message saying so when libxml2 is older or missing.

The defaults are upstream’s: entities are not expanded, no external DTD is loaded, and libxml2 2.15 has no network access of its own, so a document refers to no file or URL it is not given unless the expand_entities, load_ext_dtd or input callback options ask for it.

Modules#

Functions#

Other Functions#

LIBXML_DOTTED_VERSION#

LIBXML_DOTTED_VERSION: the version of the libxml2 an XS build is compiled against, which is the one it runs on.