Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
go ahead... be a heretic
 
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 imbibing at the Monastery: (6)
As of 2014-04-18 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (460 votes), past polls