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



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







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