Re: [xml] Whitespace rears its ugly head again

Date view Thread view Subject view Author view

From: Harry Blundell (harry@halcyoninc.com)
Date: Mon Jan 08 2001 - 14:53:42 EST


Daniel,

I have upgraded to 2.2.11, to take advantage of your suggestion. A few
comments:

- xmlDocDumpFormatMemoryEnc has the format parameter, but doesn't use it
  for the format argument in the call to xmlDocContentDumpOutput - it is
  hardcoded to 1 (which is fine with me, but I don't think was the
  intention).

- Is setting the global variable xmlIndentTreeOutput to 1 the intended
  interface to turn on indentation? I don't see another one.

- It would be nice if the string to use for indenting (currently " ")
  was also configurable.

But anyway, I'm happy with the way things are working now. Thanks!

Harry
----------------------------------------------------------------------
Harry Blundell Principal / Senior Software Designer
Halcyon Monitoring Solutions Inc. URL: http://www.HalcyonInc.com
2300 Yonge St., Suite 1801, Box 2419, Toronto ON M4P 1E4, Canada.
PHONE: 416-932-4631 FAX: 416-932-4711 EMAIL: harry@HalcyonInc.com

On Wed, 6 Dec 2000, Daniel Veillard wrote:

>
> On Mon, Dec 04, 2000 at 03:31:08PM -0500, Matthew Kellett wrote:
> > Hi Harry,
> [...]
> > Now that change has been accomplished there is no way that I know of
> > getting a formatted dump of the tree, since the function being called is
> > static. I would find it useful as well, for logging of the xml in
> > human-readable format. Maybe Daniel could consider adding an
> > xmlDocDumpMemoryFormatted call for the next version.
>
> Harry's problem is certainly due to the fact that he builts the
> tree using the libxml interfaces. In this case there is no formatting
> spaces added to the tree. This means that libxml which now outputs
> the exact tree when saving to memory don't adds the formatting spaces
> by default. I saw no other solution than adding new APIs for forcing
> this. So I added xmlDocDumpFormatMemoryEnc() and xmlDocDumpFormatMemory()
> with an extra parameter.
> I suggest Harry to upgrade to next version when released and call
> the new function with the format parameter equal to 1. This should solve
> the problem at a minimal cost.
>
> Daniel
>
> --
> Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks :
> Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux XML libxml WWW
> Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
> http://www.w3.org/People/all#veillard%40w3.org | RPM badminton Kaffe
> ----
> Message from the list xml@rpmfind.net
> Archived at : http://xmlsoft.org/messages/
> to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:44:34 EST