XML::LibXML#
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#
XML::LibXML::AttributeHash- tie an XML::LibXML::Element to a hash to access its attributesXML::LibXML::Boolean- Boolean true/false valuesXML::LibXML::Common- Constants and Character Encoding RoutinesXML::LibXML::Devel- makes functions from LibXML.xs availableXML::LibXML::ErrNo- Structured ErrorsXML::LibXML::Error- Structured ErrorsXML::LibXML::Literal- Simple string values.XML::LibXML::NodeList- a list of XML document nodesXML::LibXML::Number- Simple numeric values.XML::LibXML::Reader- XML::LibXML::Reader - interface to libxml2 pull parserXML::LibXML::SAX- XML::LibXML direct SAX parserXML::LibXML::XPathContext- XPath EvaluationXML::LibXML::attr- LibXML.xsMODULE = XML::LibXML PACKAGE = XML::LibXML::Attr.XML::LibXML::liberror- LibXML.xsMODULE = XML::LibXML PACKAGE = XML::LibXML::LibError: the fields of the xmlError a structured error report hands over, which XML::LibXML::Error reads into an object of its own.XML::LibXML::namespace- LibXML.xsMODULE = XML::LibXML PACKAGE = XML::LibXML::Namespace: a namespace declaration of Perl’s own, a copy bound to no document.
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.