Bookmark Topic Watch Topic
  • New Topic

create xml document by xpath in java

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Report post to moderator
as i know, i can navigate existing xml document by xpath in java, i wonder if i can create a xml document framework by xpath in java?
something like:

Document doc = someobject.create(xpath expression);

then i can use DOM to fill the framework?

Thanks
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am guessing you already have a Document, and you want to use XPath expressions to extract a specific set of nodes from the document. Yes, you can do that using classes in the javax.xml.xpath package. However, an XPath expression always returns a list of nodes and not a document, so you can't create a new Document using XPath. And I'm not sure what this "framework" is which you're asking about.
 
zb cong
Ranch Hand
Posts: 416
 
    Bookmark Topic Watch Topic
  • New Topic