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

meanwhile my little test program:
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;
produces:
$VAR1 = 'political'; $VAR1 = 'Thomas Jefferson';
yea! hth someone.

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.