Re: [xml] Whitespace rears its ugly head again

Date view Thread view Subject view Author view

From: Matthew Kellett (matthewk@rebel.com)
Date: Mon Dec 04 2000 - 16:25:39 EST


I was just trying to summarize the previous discussion. I didn't think you
were blaming me. I think I was the first person who ran into this because
I'm using xml as memory to memory, not file to file.

I looked at extending out the formatting flag. It would have required
adding a parameter to two functions. I don't think it's appropriate to do
so. That's why I suggested adding an extra function to the interface. I
don't think changing the current call or reverting to the previous method
would do anything except cause headaches. If Daniel doesn't care to do it,
I can look into sending him a patch, as a starting point, in the next week
or so.

Cheers,
Matthew

At 04:12 PM 2000/12/04, you wrote:

>Matthew,
>
>Sorry, I didn't mean to blame you for anything - I understand why you had
>a problem with the XML always being formatted. I agree that it would be
>good to have the ability to enable/disable formatting. (But I'm afraid I
>have no time to offer to work on it myself.)
>
>Thanks,
>
>Harry
>----------------------------------------------------------------------
>Harry Blundell Halcyon 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 Mon, 4 Dec 2000, Matthew Kellett wrote:
>
> >
> > Hi Harry,
> >
> > The change was made because the introduced newlines became significant
> when
> > you tried to parse the xml. The change was a simple one of turning off
> the
> > formatting parameter in the call to the function that dumps the
> contents of
> > the tree. You'll notice that the carriage return after the xml tag and
> > after the one-line of the xml remain because these aren't significant.
> >
> > 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.
> >
> > Cheers,
> > Matthew
> >
> > At 03:06 PM 2000/12/04, you wrote:
> >
> > >Hi folks,
> > >
> > >I just upgraded from 2.2.6 to 2.2.10, and now when I read in and save an
> > >XML document, I get back a document where the XML is all on one line.
> > >Previously, it had some newlines in there, which was more readable.
> > >
> > >I found a dialog between Matthew Kellett and Daniel in the archive, where
> > >it was decided that the xmlDocDumpMemory function should no longer add
> > >newlines when dumping a document into a buffer, for 2.2.8. I suspect
> > >that this is what has changed.
> > >
> > >Using whitespace in my input document and trying to preserve it with the
> > >xmlKeepBlanksDefault function doesn't help because none of my elements
> > >have mixed content, so the areBlanks function always returns 1.
> > >
> > >Is there a way to format the output XML in the current version?
> > >
> > >Thanks,
> > >
> > >Harry
> > >----------------------------------------------------------------------
> > >Harry Blundell Halcyon 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
>
>----
>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 Dec 04 2000 - 16:43:56 EST