The flawed output of this section: is really not flawed!
It is printing what is in the xml.
Take a close look at it. The same information is in each of the four 'item' sections.
So you have no problem.
FYI I use "XML Notepad" to view xml and check the output. It's not bad and it's free. Give it a go.