Fix for the fact that minidom creates text nodes which count as child nodes