On 17/01/2012 18:53, Alam Sher wrote:



Pardon me if I’m asking something stupid.


I’m trying to append a child element to XdmNode. Any suggestions?


XdmNode is designed to represent nodes used as the input or output of queries, transformations, and XPath expressions; it's not designed primarily for direct manipulation in Java. (For that, use something like DOM, JDOM, or XOM, and wrap those nodes in an XdmNode when necessary.)

If you're manipulating trees, use XSLT or XQuery to do the manipulation, and pass the nodes you want to manipulate as stylesheet or query parameters using the XdmNode object.

Michael Kay