Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XmlBeans and DOM Listener

 
Robert Harvey
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application UI that uses XmlBeans to parse an XML document and display the parsed "XmlObjects" in a exploreresque treeview. XmlBeans doesn't provide much support for eventing so I am grabbing the "Document's" DomNode to employ DOM's eventing support. From there, I am getting the document's root element via getDocumentElement(). I then try to cast this element to EventTarget so I can add to the interface my org.w3c.dom.events.EventListener. However, a ClassCastException is occurring where the cast occurs from Element to EventTarget. Below is a snippet:



Any help is much appreciated - Thanks!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the EventTarget documentation, this would appear to indicate that your DOM implementation does not implement the EventTarget interface.

Bill
 
Robert Harvey
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bill - I was afraid that this was the case.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic