You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Axenbeck. Tobias" <T....@seeburger.de> on 2000/09/07 14:12:28 UTC

XMLSerialization format oddities

Hi experts, 
although my last question still is an open topic (validating after DOM
manipulation... no ideas??) i just want to know, how i can use the
XMLSerializer class to write an output which "looks like" the input
file...
my programm code is as follows...
	
		DOMParser parser = new DOMParser();
		parser.parse("test.xml");
		Document doc = parser.getDocument();
		FileWriter writer = new FileWriter("test1.xml");
		OutputFormat of = new OutputFormat(Method.XML, null,
true);
		XMLSerializer ser = new XMLSerializer(writer, of);
		ser.serialize(doc);

This works wunderful but if i look at test1.xml the formatting is a
little bit strange, no more like an tree...  Any ideas?
(Still using Xerces 1_2_0)

Thanks

Tobias

SEEBURGER AG, Edisonstr. 1, D-75015 Bretten, Germany
Fax:+49(0)7252 9358-2222  Fon:+49(0)7252 96-2285
http://www.seeburger.de