in reply to why spaces! XML::DOM

Is this really the code that doesn't work? It does exactly what you want on my computer( prints description/assertion command).

The problem might arise from the fact that getChildNodes returns not only element nodes, but includes text nodes containing the surrounding whitespaces. But as I say, for the code and file you pasted, it does work.