in reply to Re^3: how to remove an empty line from a xml file??
in thread how to remove an empty line from a xml file??

hi corion, that empty line is another child of $Item element I understood that but it is a XML::DOM::TEXT element. I don't know how to remove text nodes? don't write any code for me (y) but could you please tell me how to do that

to remove a node I do : $parent_name=removeChild($node_name)but to remove text node what should I write in place of $node_name

Replies are listed 'Best First'.
Re^5: how to remove an empty line from a xml file??
by Corion (Patriarch) on Oct 01, 2016 at 09:13 UTC

    In the code you already wrote yourself, you use the method ->removeChild. This method is just as applicable for text nodes as it is for other nodes. Maybe now is a really good moment to familiarize yourself with XML and the DOM?