File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes What am I doing wrong? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "What am I doing wrong?" Watch "What am I doing wrong?" New topic

What am I doing wrong?

Sloan Bowman
Ranch Hand

Joined: Jan 21, 2003
Posts: 107
I'm trying to use TreeWalker to simply print out each element name and I keep getting this error message.
at AccessElement.parseXML(
at AccessElement.main(
Here is the code:
Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
I haven't used TreeWalker my self, but it appears that the following casting is illegal.
document is of type Document but can you cast that to DocumentTraversal type?

Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Sloan Bowman
Ranch Hand

Joined: Jan 21, 2003
Posts: 107
The sad thing about this is this is parts from an example in a Book I bought. Go Figure. Thanks for your help. I'll try to figure it out.
I agree. Here's the link:
subject: What am I doing wrong?
It's not a secret anymore!