#!/usr/bin/perl -- use strict; use warnings; use XML::LibXML 1.70; ## for load_html/load_xml/location use XML::Compile::Schema; our $AIML_URL = 'http://files.aitools.org/programd/resources/schema/AIML.xsd'; my $adom = XML::LibXML->new(qw/ recover 2 /)->load_xml( location => $AIML_URL ); ## no caching my $aiml = XML::Compile::Schema->new( $adom); $aiml->printIndex; ## print "\n$adom\n"; print $adom->find(q{ //*[ @name="OneOrTwoDIndexedElement"] } )->get_node(0), "\n";