funny, I just been doing this. Try:
System.out.println("Parsing XML file: "+uri+"\n\n");
DOMParser parser = new DOMParser();
try{
parser.parse(uri);
Document doc = parser.getDocument();
OutputFormat of = new OutputFormat(newDoc);
of.setPreserveSpace(false);
of.setIndent(5);
of.setLineWidth(80);
BufferedOutputStream oStream = new BufferedOutputStream(new
FileOutputStream("fileName"));
XMLSerializer ser = new XMLSerializer(oStream,of);
ser.serialize(doc);
oStream.close();
}
}
[EMAIL PROTECTED] on 03/30/2001 03:03:08 PM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc: (bcc: Barry Nobel/IN/FIS)
Subject: print an DOM
Hello,
Just like sun parser has xmldocument.write(System.out) method to dump
DOM onto std output.
Is there any api or framework that can print DOM from xerces parser.
thanks
Title: print an DOM
Hello,
Just like sun parser has xmldocument.write(System.out) method to dump
DOM onto std output.
Is there any api or framework that can print DOM from xerces parser.
thanks
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
