in reply to Re^2: XML::LibXML question: How to list XInclude files, which are supposed to be included?
in thread XML::LibXML question: How to list XInclude files, which are supposed to be included?
I don't know how to use XML::LibXML, but this is simple using XML::Twig
use warnings; use strict; use XML::Twig; my $myXML = <<EOF; <?xml version="1.0"?> <reports xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="xinclude.xml" parse='xml' /> </reports> EOF my $t = XML::Twig->new(twig_handlers => {'xi:include' => sub { print $ +_->att('href') } }); $t->parse($myXML); __END__ xinclude.xml
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: XML::LibXML question: How to list XInclude files, which are supposed to be included?
by ikegami (Patriarch) on Jul 06, 2011 at 18:39 UTC | |
|
Re^4: XML::LibXML question: How to list XInclude files, which are supposed to be included?
by AlexFromNJ (Novice) on Jul 06, 2011 at 18:41 UTC | |
by locked_user sundialsvc4 (Abbot) on Jul 07, 2011 at 02:56 UTC |