Wong Kok Wai wrote: > > Xerces 1.0.2: Comments nodes are not printed properly by the serializer > IMHO. The following is the patch I've made for > org.apache.xml.serialize.BaseMarkupSerializer:
Not that simple. The serializer will now add a space between the element and comment, which is good for indentation, but might not belong there. There's code for dealing with that for XML and specifically for HTML (some nasty behavior in Netscape 4.7) with regards for text content, so the comment code should be just as sophisticated. > However, the bad news is comment that span multiple lines still is > printed on a single line. I couldn't figure out how to fix this. Even more complex. My comments are indented manually as I put them in the text file (and I've seen that happen in several other places). Making the serializer indent that text requires some extra logic to remove or deal with the existing indentation. arkin -- ---------------------------------------------------------------------- Assaf Arkin www.exoffice.com CTO, Exoffice Technologies, Inc. www.exolab.org