bueno al final lo encontre:
Código PHP:
public String fncObtenerStringDoc(Document doc)throws Exception{
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(doc);
StringWriter sw=new StringWriter();
StreamResult result = new StreamResult(sw);
transformer.transform(source, result);
String xmlString=sw.toString();
return xmlString;
}
con este metodo se trasforma correctamente :)
saludos :)