Hi,
I have searched far and wide and can not find an answer. I am using dom4j and have obtained a Node thus:
XPath xp;
String search = "/project/sco[@id='" + scormID + "']/sequence[@id='" + sequenceID + "']";
xp = DocumentHelper.createXPath(search);
Node node = (Node) xp.evaluate(doc); //doc is a Document
Now I need to add a brand new (therefore not cloneable) Element under this Node.
There doesn't appear to be a way to do this. I would expect something like:
node.addElement(new Element());
but this is not possible.
Can anyone please help me out here?
Thanks in advance..
Hugh