XML::LibXML::Debugging - 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 DOM's namespaces and structure. toClarkML produces a string of XML-like markup with explicit namespaces. The following XML:
toClarkML
<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 toDebuggingHash returns a hashref suitable for dumping using Data::Dumper.
toDebuggingHash
Please report any bugs to http://rt.cpan.org/.
XML::LibXML, XML::LibXML::Debugging.
Toby Inkster <tobyink@cpan.org>.
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.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
To install XML::LibXML::Debugging, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::LibXML::Debugging
CPAN shell
perl -MCPAN -e shell install XML::LibXML::Debugging
For more information on module installation, please visit the detailed CPAN module installation guide.