[jdom-interest] Problem with Jdom8 - getChildren() on root doesn't work...
Tom Preston
tpreston at amadeusboston.com
Thu Mar 28 06:14:52 PST 2002
Problem with Jdom8 - getChildren() on root doesn't work on a document that
has been transformed in memory using documented jdom transform methodology:
Transformer transformer = TransformerFactory.newInstance()
.newTransformer(new StreamSource(stylesheet));
JDOMResult out = new JDOMResult();
transformer.transform(new JDOMSource(in), out);
return out.getDocument();
Interesting resulti is that
Element root = doc.getRootElement();
boolean hasChildren = root.hasChildren();
returns "true" while
List theChildren = root.getChildren();
returns a List of size 0 (zero).
This was NOT a problem with JDOM 7 but is a problem with JDOM 8.
Note that the doc prior to transformation doesn't have this problem. Has
anyone else seen this with 8? Is it true that I should never get a zero
size list from getChildren() method if hasChildren() method returned true?
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20020328/28ff8cab/attachment.htm
More information about the jdom-interest
mailing list