Thomas DeWeese wrote:
<snip/>
I am reasonably sure that the Document Element is not the parent of nodeList.item(0). In which case the above call will slightly corrupt our DOM. I've added additional checks so an error will be raised in this condition in the future.
okay.
You probably want:
Element elt = (Element)nodeList.item(0); elt.getParentNode().replaceChild(documentNode, elt);
Works fine now, thanks !
Also why are you dragging in XPath just to do getElementById?
String xpath = "//[EMAIL PROTECTED]'" + feature + "']"; final NodeList nodeList = org.apache.xpath.XPathAPI .selectNodeList(document, xpath);
I know, leftover from more complicated node searches :)
Thanks again Jorg Heymans
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]