I am new to XML/XSLT and I am trying to do the following and I receive a WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
I was able to see the logic behind it and use doc.importNode(child, true) and that didnt work.
Extending AbstractXsltView, I am trying to domify my objects and add it to the model object
Here is my code
Do you (or anyone) know of a way to achieve the same in any fashion. Spring website provides an example which works for me (but its too simple for me to use it to comprehend the problem in the above situation).
Your document already has a root node, right? And an XML document can only have one root node. So when you try to add another child to the document, you are violating that rule. Probably you meant to add that node somewhere lower in the tree.
Yes you are right .. took a while for me to figure that out - but commented out the code (//Element rootElement = doc.createElement(root);) and I was able to append the node to the doc.
but now I am getting a java.lang.UnsupportedException - when Spring tries to render the page out - which is generated from NodeAdapter(from Domify jar)
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.