Re: [xml] xml output streaming and c14n
- From: Aleksey Sanin <aleksey aleksey com>
- To: Prashant R <ramapra gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] xml output streaming and c14n
- Date: Thu, 20 Nov 2008 17:46:39 -0800
Look at testC14N.c for a c14n example.
Aleksey
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
<http://xmlsoft.org/html/libxml-xmlIO.html#xmlOutputBufferCreateIO>
(xmlOutputWriteCallback
<http://xmlsoft.org/html/libxml-xmlIO.html#xmlOutputWriteCallback>
iowrite, xmlOutputCloseCallback
<http://xmlsoft.org/html/libxml-xmlIO.html#xmlOutputCloseCallback>
ioclose, void * ioctx, xmlCharEncodingHandlerPtr
<http://xmlsoft.org/html/libxml-encoding.html#xmlCharEncodingHandlerPtr>
encoder) // as I need to stream to I/O
* then using the API xmlTextWriterPtr
<http://xmlsoft.org/html/libxml-xmlwriter.html#xmlTextWriterPtr>
xmlNewTextWriter (xmlOutputBufferPtr
<http://xmlsoft.org/html/libxml-tree.html#xmlOutputBufferPtr> out)
, to create an xmlWriterObject
* write out the xml nodes based on my application logic
Quesions
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 http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]