Re: [xml] Re: Added new child to DOM tree does not have line breaks.



On Mon, Mar 01, 2004 at 02:32:55PM +0100, Enno Rehling wrote:
Daniel Veillard wrote:

 Formatting doesn't exist. You have text nodes containing formatting
spaces. The only way to be sure to get them is to generate them !

In that case, I misunderstood the meaning of 'Format' in the name 
xmlSaveFormatFileEnc(). The documentation says it will indent 
automatically, and I assumed that included adding text nodes. So you say I 
have to generate text nodes with spaces, which it will then use for 
indenting? I'll give that a shot.

  if there is already a text node in the children list, then libxml2
will not output any more text node to not break any possible element with
mixed contentmodel.

It seems like such a common task, though. Is there some functionality for 
creating such formatting anywhere in the library, or does anyone have it?

  That could be a way to make "formatting" without risking to break 
some existing document data.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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