only select child nodes that are actual nodes

Before, it failed when the XML was formatted to be more readable, as line
breaks and spaces where interpreted as text nodes.