Re: [xml] Saving without tree

Date view Thread view Subject view Author view

From: Adrian Feiguin (feiguin@magnet.fsu.edu)
Date: Fri May 26 2000 - 16:08:48 EDT


On Fri, 26 May 2000 mdf@angoss.com wrote:

>
> > > 1) Is there a better way? [to generate XML documents than masses of
> > > fprintfs]
>
> Without some of the convenient syntax of C++ this will become really
> disgusting really fast, and prone to irritating bugs that are tedious
> to fix. But thats just my opinion; you might like wading through a
> sea of incomprehensible printfs, trying to make safe changes to the
> generator...
>

It's kind of annoying, and yes, you can make a lot of mistakes in the
process, but I dealt with it generating my export context with functions
like
export_line
export_symbol
export_text, etc
 
> > I don't know any better way if you don't have an XML tree built in memory
>
> How about extending libXML to be a generator as well as a parser?
>
> Failing that, allowing one to use the streams libXML reads from in an
> output mode would be nice [thus one gets compression 'for free'].

I have a suggestion. What about, instead of building the whole tree,
adding the possibility of exporting subtrees? One can step on a node,
build a subtree, and export it. One can take account of the indentation
using a "depth" counter. This could be useful in situations like a
spreadsheet (Gnumeric). You can build a cell subtree, and save in a file.
This can be easily implemented as a kind of xmlNewChild without parent
tree, and a function like xmlSaveChild.
What do you think?
Regards,
<ADRIAN>

----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:13 EDT