This is normally the basic when i added a xml file to the code ....

Code ::

/use XML::XPath;
use XML::XPath::XMLParser;
use Data::Dumper;
# create an object to parse the file and field XPath queries
my $xpath = XML::XPath->new( filename => "test.xml" );

print Dumper ($xpath) ;/

OutPut ::

/$VAR1 = bless( {
                 'path_parser' => bless( {
                                           'direction' => 'forward',
                                           'context_size' => 0,
                                           'context_pos' => undef,
                                           'vars' => {},
                                           'cache' => {},
                                           'namespaces' => {},
                                           'context_set' => bless( [],
'XML::XPath::NodeSet' )
                                         }, 'XML::XPath::Parser' ),
                 '_ioref' => undef,
                 '_context' => undef,
                 '_xml' => undef,
                 '_filename' => 'test.xml',
                 '_parser' => undef
               }, 'XML::XPath' );
/

This is the OutPUt when i made changes to the code ......

 Code ::

/use XML::XPath;
use XML::XPath::XMLParser;
use Data::Dumper;
# create an object to parse the file and field XPath queries
my $xpath = XML::XPath->new( context => "test.xml" );
print Dumper ($xpath) ;/

OutPut ::

http://paste2.org/p/863311

Reply via email to