Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Mixed XML content with XML::LibXML

by ForgotPasswordAgain (Deacon)
on Sep 29, 2008 at 13:58 UTC ( #714357=note: print w/ replies, xml ) Need Help??


in reply to Mixed XML content with XML::LibXML

I'd first of all call $node->normalize, to make sure the text nodes aren't weirdly split apart. Then call $node->firstChild (both documented in perldoc XML::LibXML::Node). You might also compare $node->nodeType == XML_TEXT_NODE (see perldoc XML::LibXML "EXPORT TAGS" section for all the node types) to make sure it's a text node. I believe the "node name" of text nodes is '#text', so you could even try that.


Comment on Re: Mixed XML content with XML::LibXML
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2015-07-03 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls