$reader can probably tell you if a node is selfclosing or not