• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.w3w.dom.DOM object to an org.jdom.DOM object

 
Ambrose Tati
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Can somebody tell me if it's possible to convert an
org.w3w.dom.DOM object to an org.jdom.DOM object?
My application XML Schema validates an XML instance producing
a org.w3w.dom.DOM object. I find it easier to process XML files using JDOM so I was wondering if it's possible to do such conversion?
Many thanks
Ambrose Tati
 
Ajith Kallambella
Sheriff
Posts: 5782
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ofcourse! You can use the DomBuilder class to build a JDOM tree using a pre-existing( in memory ) DOM tree.
The class can be used to build from files, streams, etc but other builders like SAXBuilder can perform the task faster because they don't create a DOM tree first
Hope that helps!
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to do the same thing, only DOMBuilder takes a DOM Document object. But I don't have a Document object, I only have a Node object.

What is the easiest way to convert a DOM Node into JDOM Element?

Thanks
Geoffrey
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic