never did get XML::DOM::Lite to do what i wanted, but that could easily be my misunderstanding the doc. wanted to share my experiences with LIB::LibXML.
i was able to compile, test, install for axp, ibm, sgi, hp (pa-risc), rhe3(linux), and sun 5.8.
special notes:
* check the generated makefile very carefully for correct include path and libary path. neither of the two methods for spcifying the libxml2 work correctly on all platforms. (putting path to xml2-config in your PATH nor XMLPREFIX=... to Makefile.PL). will try to figure that out and report to authors.
* on hp11 if one sees:
/usr/lib/pa20_64/dld.sl: '/lib/pa20_64/libpthread.1' contains a static TLS reference to '__thread_specific_seg' defined in a dynamically loaded library '/lib/pa20_64/libpthread.1'. Use +tls=dynamic to re-compile '/lib/pa20_64/libpthread.1'.
then set and export LD_PRELOAD=/lib/pa20_64/libpthread.1
* on linux, be sure to ensure that you are not linking with native lbxml2
produces:use warnings; use strict; use Data::Dumper; use XML::LibXML; my $parser = XML::LibXML->new; my $doc = $parser->parse_file( 'practice.xml' ); my $xpath1 = '/quotelist/quotation[source = "Thomas Jefferson"]/@style +'; my $result1 = $doc->find( $xpath1 ); print Dumper $result1->string_value; my $xpath2 = '/quotelist/quotation[@id="q5"]/source/text()'; my $result2 = $doc->find( $xpath2 ); print Dumper $result2->string_value; exit 0;
yea! hth someone.$VAR1 = 'political'; $VAR1 = 'Thomas Jefferson';
In reply to Re^3: trying to use XML::DOM::Lite
by jim_neophyte
in thread trying to use XML::DOM::Lite
by jim_neophyte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |