I need to convert this file to java.
I'm taking the file as a document and need to edit it by making a change to the namespace.

```
  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.oorsprong.org/websamples.countryinfo">
   <soapenv:Header/>
   <soapenv:Body>
    <web:CapitalCity>
     <web:sCountryISOCode>...</web:sCountryISOCode>
    </web:CapitalCity>
   </soapenv:Body>
  </soapenv:Envelope>`

```

to:

```
 <Envelope>
   <Header/>
   <Body>
    <CapitalCity>
     <sCountryISOCode>...</sCountryISOCode>
    </CapitalCity>
   </Body>
 </Envelope>

```

How can I do? 

my code:

```
String xml="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://www.oorsprong.org/websamples.countryinfo\">\r\n" + 
                    "   <soapenv:Header/>\r\n" + 
                    "   <soapenv:Body>\r\n" + 
                    "    <web:CapitalCity>\r\n" + 
                    "     <web:sCountryISOCode>...</web:sCountryISOCode>\r\n" + 
                    "    </web:CapitalCity>\r\n" + 
                    "   </soapenv:Body>\r\n" + 
                    "  </soapenv:Envelope>";
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
Document doc = dbf.newDocumentBuilder().parse(new InputSource(new StringReader(xml)));
StringWriter buf = new StringWriter();
Transformer xform = TransformerFactory.newInstance().newTransformer();
xform.transform(new DOMSource(doc), new StreamResult(buf));
String output = buf.getBuffer().toString().replaceAll("<[^/](.+?):", "<");
String output2=output.replaceAll("</(.+?):", "</");
System.out.println(output2);

```

I want to do this without using regex, is this possible?