Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 5th, 2009, 07:38 PM
Authorized User
 
Join Date: Jun 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default create xml document by xpath in java

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
 
Old October 6th, 2009, 04:07 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XPath is a read-only language, it can only be used to select nodes or compute values based on their content. Take a look at XSLT or XQuery if you want to create new documents - they both use XPath as a subset.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Write a XML Document using java. vinitpugaliya XML 0 January 8th, 2007 06:26 AM
Xpath error in Document() bonekrusher XSLT 13 September 30th, 2006 02:39 AM
create 2-columns table from an XML document frosty1575 XSLT 2 May 16th, 2006 04:17 AM
XPath API and DOM Document object nnravi XML 10 May 2nd, 2006 12:24 PM
XPath Evaluate Document safin XML 2 September 19th, 2005 07:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.