Re: XML in, XML out

2007-01-03 Thread Randal L. Schwartz
> ""Beginner"" == "Beginner" <[EMAIL PROTECTED]> writes: "Beginner"> "running xml2-config...failed "Beginner"> The installed version of libxml2 not compatible with XML::LibXML." It's not just a minimum. There are some versions of libxml2 that are sufficiently broken that the the author of X

Re: XML in, XML out

2007-01-03 Thread Beginner
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

Re: XML in, XML out

2006-12-28 Thread Jenda Krynicky
From: "Beginner" <[EMAIL PROTECTED]> > Hi All (and a happy holiday to those that will get a break), > > I am trying to read in an XML file of addresses. I need to remove all > the address data from the file where code =~ /^000/ (there are none in > the example data below). I need to reproduce that

Re: XML in, XML out

2006-12-24 Thread Rob Dixon
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 appe

Re: XML in, XML out

2006-12-23 Thread Randal L. Schwartz
> "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? Don't you want .//code there ? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 00

Re: XML in, XML out

2006-12-23 Thread Randal L. Schwartz
> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: >> my @bad = $doc->findnodes(q{//address[.//code[starts-with(., "BJPU")]]}); Rob> my @bad = $doc->findnodes(q{//address[starts-with(code, "BJPU")]}); It's clear to me that myy XPath-fu is still weak. Thanks for showing me the better way. At

Re: XML in, XML out

2006-12-23 Thread Rob Dixon
Randal L. Schwartz wrote: ""Beginner"" == "Beginner" <[EMAIL PROTECTED]> writes: "Beginner"> I have been trying to use XML::Simple and I had a go with XML::Smart "Beginner"> but I haven't been able to get the results I want. I'd use XML::LibXML, with an XPath expression, as follows. I'm de

Re: XML in, XML out

2006-12-23 Thread Randal L. Schwartz
> ""Beginner"" == "Beginner" <[EMAIL PROTECTED]> writes: "Beginner"> I have been trying to use XML::Simple and I had a go with XML::Smart "Beginner"> but I haven't been able to get the results I want. I'd use XML::LibXML, with an XPath expression, as follows. I'm demoing by deleting the o

XML in, XML out

2006-12-22 Thread Beginner
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag s