You could achieve your example using a simple bit of recursive XQuery, I
do not know of a way of achieving it using just XPath. Also it would not
be able to handle all eventualities of XPath (think axes).

Thanks Adam

-----Original Message-----
From: Shah Asrani [mailto:shahasr...@gmail.com] 
Sent: 15 December 2008 22:45
To: j-users@xerces.apache.org
Subject: Creating DOM using XPath

I can walk the DOM tree to create an xpath expression for a given
node.  I need to create a DOM from scratch using XPath expression.

say, I have the expression /a/b/c such that DOM looks like:
<a>
  <b>
     <c/>
  </b>
</a>

Is there any API that I can use to generate Such DOM using the XPath
expression?

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org


Registered Office: 7 Abbey Court, Eagle Way, Sowton, Exeter, Devon, EX2 7HY
Registered Number 2892803 Registered in England and Wales 

This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 

The information contained in this e-mail is confidential and may be subject to 
legal privilege. If you are not the intended recipient, you must not use, copy, 
distribute or disclose the e-mail or any part of its contents or take any 
action in reliance on it. If you have received this e-mail in error, please 
e-mail the sender by replying to this message. All reasonable precautions have 
been taken to ensure no viruses are present in this e-mail. Landmark Information
Group Limited cannot accept responsibility for loss or damage arising from the 
use of this e-mail or attachments and recommend that you subject these to 
your virus checking procedures prior to use.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to