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



On Mon, Mar 01, 2004 at 01:26:32PM +0100, Enno Rehling wrote:
Debin Chen wrote:

However, if I edit a DOM tree by opening an existing XMl file, then
added a few children. After I save it, the problem is that the newly
added children works, but they do not have line breaks. One line holds
all the children and it is of course hard to read when editing the file
again.

We have seen the same here, and are looking for a solution. Someone just 
told me that reading the file again and then saving it will get the 
formatting right, but that's of yourse no more than a really bad hack.

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

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]