I had a need for a similar API.

Here is how i thought it could be implemented :

1. Take a look at JXPath - Apache's library using which you can walk a Tree of objects using XPath.
2. For given XPaths create the Java Bean Tree
3. Then marshall this Java Bean Tree to XML using JAXB.

Now, let me tell you that it is not as simple as it sounds. But then, JAXB has come a long way since i last taken a look at it.

Good luck.

-Prashant

Shah Asrani wrote:
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



---------------------------------------------------------------------
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