xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Luca Passani <passani AT eunet.no>
- To: Elliotte Harold <elharo AT metalab.unc.edu>
- Cc: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] XML pretty printer
- Date: Sun, 12 Aug 2007 22:15:41 +0200
I think I found the problem. When the tag is a <singleton/>, neither writeEndTag() nor writeStartTag() are triggered.
is this the correct behavior? assuming it is, which other method can I invoke to add my breakLine() also in the case of singletones?
Thanks
Luca
Elliotte Harold wrote:
When you pretty print, XOM assumes it can muck with the white space. You could probably override writeEndTag to add an extra line after certain elements. E.g.
protected void writeEndTag(Element element) {
super.writeEndTag(element);
if (element.getLocalName().equals("device")) {
breakLine();
}
}
- Re: [XOM-interest] XML pretty printer, Luca Passani, 08/12/2007
Archive powered by MHonArc 2.6.24.