You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Martin Vysny <vy...@sozo.fns.uniba.sk> on 2004/03/25 21:34:52 UTC

Cloned document serialized with resolved entities

Hi again ;)
  I'm using following code to serialize document:
OutputFormat of = new OutputFormat("xml", "UTF-8", false);
XMLSerializer ser = new XMLSerializer(of);
ser.setOutputByteStream(output_stream);
....
serializeDoc = (Document)doc.cloneNode(true);
ser.asDOMSerializer().serialize(serializeDoc);
doc is instance of Document. When serializing doc, it goes ok. However, 
when serializing serializeDoc, then in the result XML all entities are 
suddenly resolved and their definition is lost. serializeDoc however has 
all entities and EntityReferences as the original doc - it seems to be a 
perfect clone. I'm using xerces2.6.2. Any idea?
Thanks,
Martin Vysny

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org