Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: creating large xml files

by samtregar (Abbot)
on Jun 22, 2006 at 15:40 UTC ( #556923=note: print w/replies, xml ) Need Help??

in reply to creating large xml files

I've used XML::Writer to write large files - it has a simple interface and makes it hard to write a file that won't parse. If you've got more complex requirements you can use XML::SAX with XML::SAX::Writer to write large documents without holding them in memory. That would let you validate as you write with XML::Validator::Schema, for example.


Replies are listed 'Best First'.
Re^2: creating large xml files
by adamk (Chaplain) on Jun 24, 2006 at 23:45 UTC
    SAX is almost certainly the answer you want for writing big XML files. Even better, you can generate them directly from your model.

    That said, SAX generators can be fairly wordy to write, so XML::Generator might be a nice alternative.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://556923]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2020-11-24 10:49 GMT
Find Nodes?
    Voting Booth?

    No recent polls found