in reply to convert to XML
The example output you're trying to generate isn't actually XML. Every XML document must have a single top-level element that contains all the other elements. E.g:
<?xml version="1.0"?> <STUFF> <DATA>data1</DATA> <ENTRY>entrying here</ENTRY> <STORY>Story details </STORY> </STUFF>
|
|---|