Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: missperception of XML::LibXML

by runrig (Abbot)
on Oct 17, 2011 at 19:58 UTC ( [id://931997]=note: print w/replies, xml ) Need Help??


in reply to missperception of XML::LibXML

Note that 'or die' is not necessary on the parse_file(). XML parsers will die if they try to parse bad XML. Also you might be able to get your desired nodes with just XPath (modifying ikegami's answer, but not tested):
for my $node ($root->findnodes("//ParagraphStyleRange[fn:contains(@App +liedParagraphStyle, 'BODY TEXT']/CharacterStyleRange/Content")) { say $node->textContent() } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://931997]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found