in reply to reading from xml files

Ok this is just a thought but I see two equal lines in your file. With this I mean they are both top level, there is no child parent relation for that to be there one would have to be in side the other.
<parent> <child> <second_child></second_child> </child> </parent>
Rob.