Re: [xml] possible problem with xmlSaveFormatFile
- From: Daniel Veillard <veillard redhat com>
- To: roger day globalgraphics com
- Cc: xml gnome org
- Subject: Re: [xml] possible problem with xmlSaveFormatFile
- Date: Wed, 5 Mar 2003 07:18:55 -0500
On Wed, Mar 05, 2003 at 11:59:26AM +0000, roger day globalgraphics com wrote:
As you can see (if your mailer hasn't reformatted it beyond belief) the last
products (those with productIdentity that contain attributes of Plugins and
which represent nodes added by the second process) have not been formatted,
although the others have. The file was written again using xmlSaveFormatFile.
It doesn't effect the browser: it's seems to me that the function doesn't do
what it says on the tin, although I could be missing something.
Well, basically the formatting prefers to not make indentation than
to make an error by adding indentation. In that case I think it detected
that there was text nodes previous siblings and in this case it will
not add any indentation [*]. White spaces are significant in XML, and
if you really need to make sure there is some indentation the best is to
generate the associated text node in your code.
Daniel
[*] maybe that detection algorithm can be improved but it would take
far more CPU cycles to serialize XML too...
--
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]