Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

org.w3c.dom.Node and Element implementations changed.

133941Nov 18 2002 — edited May 4 2006
It looks like the implementation of org.w3c.dom.Element in xmlparserv2.jar has changed with the release of 9.0.3, and no longer fully meets the interface. The following is from the Element.getElementsByTagName() javadocs:
"Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are encountered in a preorder traversal of this Element tree."
This was true through 9.0.2. But now I get a ClassCastException when I cast one of the Nodes in the returned NodeList to an Element. This makes getElementsByTagName() pretty much useless. This is true for other methods as well. Does anyone know of an easy workaround for this? Will this be fixed?
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2006
Added on Nov 18 2002
15 comments
588 views