Re: [xml] xml output streaming and c14n

Look at testC14N.c for a c14n example.


Prashant R wrote:
I have a requirement, where I would not want to have the entire xml data in memory and preferably writing out canonicalized XML to IO . I had a few questions to understand this better I was planning on doing the following
    * creating an OutputBuffer using the API - xmlOutputBufferCreateIO
      iowrite, xmlOutputCloseCallback
      ioclose, void * ioctx, xmlCharEncodingHandlerPtr
      encoder) // as I need to stream to I/O
    * then  using the API  xmlTextWriterPtr
      xmlNewTextWriter (xmlOutputBufferPtr
      <> out)
      , to create an xmlWriterObject

    * write out the xml nodes based on my application logic

1. When will the actual write ( to I/O , in my case )occur ? Could it occur before the entire document is fully completed?

2. Is there a way where I could stream xml data directly to IO without building the tree in memory ( using DOM API's)?

3 If there is a way to do (2) , then is there a way to specify that the output be canonicalized ?

Thanks in advance


xml mailing list, project page
xml gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]