Hi all I have a method which writes an xml (as a DOm object ) to the file system which is in another machine (by using drive mapping in WINDOWS OS ). For writing to the file system , I am using the following code :
public xmlToFile(Document document,String pathAndNameWithExtension){ File file = new File(pathAndNameWithExtension); file.createNewFile(); TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformar = tFactory.newTransformer(); DOMSource domSource = new DOMSource(document); FileOutputStream fos = new FileOutputStream(file); StreamResult result = new StreamResult(fos); transformar.transform(domSource, result); } Now the problem is that , when i open the xml in the destination folder , some xmls are not proper . some are not well formed , some have changed attrib names etc ...
Can anybody point out what may be the possible issue . can the network be responsible for it ??