Hello David,
in case you know parent node is element, you can change type of variable:
Element parentElement = (Element) parentNode;
But with dom4j you should better do this:
private static void updateNode(Document document, String elementName, String
text) {
Namespace xdp = Namespace.get("x
Hey guys,
This is driving me nuts.
I’m trying to write a method which will update the an element’s
text.
However, if the element doesn’t yet exist, I want to
create it. How are you meant to do this??!
private static void
updateNode(Document d, String elementName, String