How do I close an XML tag with out the the full text?

When I write out the xml file, it's written like so:-



I want the ending tag not to contain the opening tag wording.... like so



I'm new to writing out XML, any advice would be appreciated.   

The reason I want to do this, is because I'm writing a small app that outputs some data to be read by another application (which I have no control), when I remove the tag text from the closing tag it reads the file fine, with it, it doesn't.

Thanks in advance.