File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

create xml document by xpath in java

 
zb cong
Ranch Hand
Posts: 416
  • 0
  • 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
Pie
Posts: 20171
24
MySQL Database
  • 0
  • 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
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic