On 24 Dec 2006 at 12:23, Rob Dixon wrote: > Randal L. Schwartz wrote: > > "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: > > > > Rob> my @bad = $doc->findnodes(q{//address[starts-with(code, "BJPU")]}); > > > > Actualy, doesn't that require code immediately below addess? > > Yes > > > Don't you want .//code there ? > > Almost certainly not. In the example XML <code> appeared only as a child > element > of <address>. In the general case it is unlikely to reappear at a lower level > and // would force the XSLT engine to search further than was necessary. > > By the way the dot is also unnecessary as it is implicit before // anywhere > except at the beginning of a path expression. (A path starting with // covers > all descendants of the document root.)
Sorry to tread on an old thread. I was hoping to try XML::LibXML but am having trouble with the install. Not sure if this is the right place to ask but.... My installed version of XML2 is 2.6.20, th readme for XML::LibXML says a mimimum of version 2.6.16 is required. But it complains when creating the makefile that "running xml2-config...failed The installed version of libxml2 not compatible with XML::LibXML." It's a long-shot but does anyone know what the problem is here? There isn't anything relevant on via searcb engine or at http://xmlsoft.org/FAQ.html TIA. Dp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/