HI,
How to update element into an XML file? I have an XML file where I need to update InvoiceID for <DocumentReference> and type for <InvoiceStatus > How will I do it.

I have XML document:
org.w3c.dom.Document doc = documentBuilderFactory.newDocumentBuilder().parse(inputStream);

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.014/cXML.dtd">
<XML>
<Request>
<StatusUpdateRequest>
<DocumentReference InvoiceID="pol1234"></DocumentReference>
<Status code="200" text=""></Status>
<InvoiceStatus type="Paid">
<PartialAmount>
<Money currency="USD">10.99</Money>
</PartialAmount>
<Comments>Paid to vendor.</Comments>
</InvoiceStatus>
</StatusUpdateRequest>
</Request>
</XML>