hi,
i'm trying to serialize through jaxp like
target=new StreamTarget(new FileWriter("output.xml"));
TransformerFactory.newInstance().newTransformer().transform( source, target);
but the source is splitted in many little Dom-Trees
//first start document
startElement("Root");
//then many Nodes as DOM-Trees;
transform( new DOMSource(firstNode), target);
transform( new DOMSource(secondNode), target);
transform( new DOMSource(fxyNode), target);
transform( new DOMSource(lastNode), target);
//end of document
endElement("Root");
how can i do that through jaxp?
or do i need xerces serializer like
SerializerFactory
factory=SerializerFactory.getSerializerFactory(_method);
OutputFormat outputFormat=new OutputFormat(_method,_encoding,true);
outputFormat.setIndent(2);
outputFormat.setLineWidth(0);
outputFormat.setPreserveSpace(true);
outputFormat.setOmitXMLDeclaration( _omitXMLDeclaration );
serializer=factory.makeSerializer(outputStream,outputFormat);
ContentHandler docSerializer=getSerializer().asContentHandler();
docSerializer.startDocument();
docSerializer.startElement(null,null,"Root",null);
Adrian Stadelmann
Software Development
---------------------------------------------------
BISON Schweiz AG
Eichweid 5
CH-6203 Sempach-Station
Phone direct +41 41 469 65 03
E-Mail mailto:[EMAIL PROTECTED]
Homepage www.bison-group.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]