Re: [gdome]saving xml tree: no new line after xml elements printing



Paolo,

It seems to me that having the feature of printing a newline after
each xml elements are printed is something that should be set-able
from a call to gdome_DOMImplementation_saveFile (the best would be
a tabulation the number of which depends on the depth of the xml
element).

Would not be possible to add this feature to
gdome_DOMImplementation_saveFile? (a new argument like beautify set-able
TRUE or FALSE)

I don't know if this makes sense and if I can help?

Thanks,

Laurent


Paolo Casarini wrote:
> 
> On Wed, 25 Apr 2001, Laurent Lemaitre wrote:
> 
> > Seems that gdome_DOMImplementation_saveFile does not
> > print a new line after each xml elements are printed (as it did
> > for 0.6.2)
> This is right.
> To make indentation you have to add Text nodes between Element nodes.
> For example, if you want to print a new line between two  element nodes
> (el1 and el2) you have to write something like this:
> ...
> GdomeDOMString *str;
> GdomeText *txt;
> GdomeNode *tmp;
> ...
> str = gdome_str_mkref ("\n");
> txt = gdome_doc_createTextNode (doc, str, &exc);
> tmp = gdome_el_insertBefore (parent, txt, el2, &exc);
> gdome_n_unref (tmp, &exc)
> gdome_t_unref (txt, &exc);
> ...
> 
> Bye
>   Paolo
> --
> Paolo Casarini - casarini cs unibo it
> 
> _______________________________________________
> gdome mailing list
> gdome gnome org
> http://mail.gnome.org/mailman/listinfo/gdome




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