You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-user@jakarta.apache.org by Peter Felix <fe...@imagic.ch> on 2004/06/18 08:31:08 UTC

sequentially writing XMLDocument

Hi

I want to generate big xml files. Is there a possibility to write the
XMLDocument sequentially. For example after a call of addElement(). Because
otherwise I have to hold the hole xml object in memory.

Thanks
Peter
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.707 / Virus Database: 463 - Release Date: 15.06.2004


---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org


Re: sequentially writing XMLDocument

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi peter

ECS XMLDocument is a document object model (small dom not large DOM) 
based technology. a common problem with this kind of technology is that 
it's difficult to write out a document sequentially. essentially, you 
have to create the entire document before it can be written out.

the way i'd approach this problem would be to use direct calls to a SAX 
interface. i don't know of any product out there that provides a 
convenient java wrapper but this kind of thing is really pretty easy to 
do. you use the SAX events produced to either feed an XSLT engine or 
use a SAX-to-stream writer to push the output straight out of the pipe.

- robert

On 18 Jun 2004, at 07:31, Peter Felix wrote:

> Hi
>
> I want to generate big xml files. Is there a possibility to write the
> XMLDocument sequentially. For example after a call of addElement(). 
> Because
> otherwise I have to hold the hole xml object in memory.
>
> Thanks
> Peter
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.707 / Virus Database: 463 - Release Date: 15.06.2004
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ecs-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org