Get debugging information from xml::libxml nodes
use XML::LibXML::Debugging; my $parser = XML::LibXML->new; my $doc = $parser->parse_file('input.xml'); print $doc->toClarkML;
This module adds a couple of additional methods to XML::LibXML::Node objects which are mostly aimed at helping figure out what's going on with the \s-1DOM\s0's namespaces and structure. \*(C`toClarkML\*(C' produces a string of XML-like markup with explicit namespaces. The following \s-1XML:\s0
<foo xmlns="http://example.com/1" xmlns:bar="http://example.com/2" bar:baz="quux" />
Might be represented as:
<{http://example.com/1}foo {http://www.w3.org/2000/xmlns/}xmlns="http://example.com/1" {http://www.w3.org/2000/xmlns/}bar="http://example.com/2" {http://example.com/2}baz="quux" />
Another method \*(C`toDebuggingHash\*(C' returns a hashref suitable for dumping using Data::Dumper.
Please report any bugs to <http://rt.cpan.org/>.
XML::LibXML, XML::LibXML::Debugging.
Toby Inkster <[email protected]>.
Copyright (C) 2009-2011 by Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
\s-1THIS\s0 \s-1PACKAGE\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 \s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.