[jdom-interest] Deprecating some XMLOutputter constructors
philip.nelson at omniresources.com
philip.nelson at omniresources.com
Tue Jun 19 14:30:43 PDT 2001
> (1) Is this is only a problem if you have mixed content?
>
> (2) I guess I'm surprised that we try to do anything to
> character data that's
> not just whitespace.
>
> It would be nice if a pretty-printed document was logically
> unchanged if you
> don't have mixed content, or if you ignored all ignorable whitespace.
>
This was a problem with the terminology used. We had called it getTextTrim
but in the case of mixed content, we were in fact normalizing in a somewhat
non standard way. We believe that trim should just be string.trim on the
current node and the getNormalizedText should do what this means in the xml
sense. So that's where all this came from. I don't remember the date but
it should be documented in the archives and in the Element change logs.
> Alex
>
> > Unfortunately, then when you pretty-print text that's
> already pretty,
> > it becomes less so.
> >
> > If your input is a file containing
> >
> > <hello>
> > my honey
> > <hello>my baby</hello>
> > </hello>
> >
> > Then XMLOutputter(" ", true) (no normalization) will give you
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <hello>
> >
> > my honey
> >
> > <hello>my baby</hello>
> >
> >
> > </hello>
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com
More information about the jdom-interest
mailing list