Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: XML parsing and Lists

by madbee (Acolyte)
on Jul 05, 2013 at 01:56 UTC ( #1042560=note: print w/replies, xml ) Need Help??


in reply to Re^3: XML parsing and Lists
in thread XML parsing and Lists

Yes, that was an error. I dont need to cretae a new root. However, I do need to search for the "Include" node since the document can have multiple H5 nodes.

Speaking of document, the XML structure is not consistent across documents. In this, my List is in H5. But in another it can be anywhere else. So, it give a range of paths, could you please let me know if this is correct?

Thanks again for your help. Really appreciate your time

my $xc = XML::LibXML::XPathContext->new; my $count = $xc->findvalue('count(//Article//Sect//LI|//Article//Sect/ +/Part//LI|//Article//Part//Li)', $dom); print "$count list nodes found.\n" if $count;

Replies are listed 'Best First'.
Re^5: XML parsing and Lists
by choroba (Chancellor) on Jul 05, 2013 at 02:00 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042560]
help
Chatterbox?
[erix]: in this context, one learns all kinds of interesting psychological excuse-jargon: not just 'alternative facts'; how about 'gapped knowledge' ? :)
[erix]: which still manages to sound more or less positive
[Corion]: Huh. I wasn't aware that you cannot segregate Python 2 and Python 3 modules... Hopefully Perl 6 module use C6AN and thus avoid the problem...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-01-24 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.