title: Update XML using XMLStreamWriter
body: <p>I have a large XML and I want to update a particular node of the XML (like removing duplicate nodes).</p>
  
  <p>As the XML is huge I considered using the STAX api class - XMLStreamReader. I first read the XML using XMLStreamReader. I stored the read data in user objects and manipulated these user objects to remove duplicates.</p>
  
  <p>Now I want to put this updated user object back into my original XML. What I thought is that I can marshall the user object to a string and place the string at the right position in my input xml. But I am not able to achieve it using the STAX class - XMLStreamWriter</p>
  
  <p>Can this be achieved using XMLStreamWriter? Please suggest.
  If no, they please suggest an alternative approach to my problem.</p>
  
  <p>My main concern is memory as I cannot load such huge XMLs into our project server's memory which is shared across multiple processes. Hence I do not want use DOM because this will use lot of memory to load these huge XML.</p>