Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 about the Monastery: (10)
As of 2014-12-25 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls