Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Parsing XML

by runrig (Abbot)
on Oct 29, 2013 at 17:55 UTC ( #1060198=note: print w/ replies, xml ) Need Help??


in reply to Parsing XML

... xmlns="urn:us:org:my:gfmdi:v35">
Your document does not exist in the null namespace. You'll need to specify it in your XPath, using XML::LibXML::XPathContext. E.g.:
my $parser = XML::LibXML->new(); my $xmldoc = $parser->load_xml( location => $file, ); my $xc = XML::LibXML::XPathContext->new($xmldoc); $xc->registerNs('gfm', 'urn:us:org:my:gfmdi:v35'); for my $sample ($xc->findnodes('/gfm:GfmDocument/gfm:GFMIEDM35/gfm:OBJ +_ITEM_OO_TBL/gfm:OBJ_ITEM')) {


Comment on Re: Parsing XML
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (14)
As of 2014-07-28 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (206 votes), past polls