in reply to XML::LibXML - Removing text nodes

I think you need to turn off the 'keep blanks' mode:
$parser->keep_blanks(0);