I might be mistaken but what you are getting is the normalized whitespaces inbetween your nodes, which is considered to be their content. Example: ... <test> <test2/> </test>
Will return the following dom: test | ------------------- / | \ #text test2 #text Stefan Langer