Don't ask to ask, just ask | |
PerlMonks |
replaceChild in LibXMLby rgaddi (Novice) |
on Jul 28, 2009 at 17:51 UTC ( [id://783994]=perlquestion: print w/replies, xml ) | Need Help?? |
rgaddi has asked for the wisdom of the Perl Monks concerning the following question: Oh Wise Monks -- I've tried it 10 different ways, and I still can't manage to replace a node in an XML::LibXML::Document. The document ($results) is the output of an XML::LibXSLT stylesheet transformation, and all I want to do is turn any text inside of <hti:wrap></hti:wrap> tags into a text node. Unfortunately, my replaceChild calls are simply ignored; the old nodes remain and the new ones vanish. Using replaceNode, insertBefore, or insertAfter instead gives me "Use of uninitialized value in subroutine entry". addChild does put the new text nodes into the tree, but appendChild is ignored entirely.
Any help would be greatly appreciated. I'm running this under Windows XP; not quite sure what problems libxml may have for me this way. Thanks,
Back to
Seekers of Perl Wisdom
|
|