Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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')) {

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 contemplating the Monastery: (11)
As of 2016-06-29 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (370 votes). Check out past polls.