libxml - TxmlDoc and ramstream

BlitzMax Forums/Brucey's Modules/libxml - TxmlDoc and ramstream

plash(Posted 2008) [#1]
Is TxmlDoc.ToString() an efficient way to get the contents of the xml (to save it to a ramstream - for a zip package)?

zipengine allows me to add a file from a ramstream, but I don't see any other way of getting one then copying TxmlDoc.ToString() into a new one.


Brucey(Posted 2008) [#2]
Probably not the most efficient, no.

There is a TxmlOutputBuffer type, which I'm using internally. It apparently allows for implementing callbacks for write/close which I could make available.
Might even be able to wrap it in an output "stream" if that will be useful?

Function type: xmlOutputWriteCallback
int	xmlOutputWriteCallback		(void * context, 
					 const char * buffer, 
					 int len)


The function would be called per block of data, with the buffer Byte Ptr filled with data, and len the size in bytes....