Re: [dom4j-user] Element.createCopy() root problem

2003-12-15 Thread Benjamin Kopic
David, dom4j behaved correctly, since you are requesting wrong element from the context of your XPath. You are retrieving element in this line of the code: > Node node = document.selectSingleNode("/root/first"); Then you create a copy of that node. > elem = elem.createCopy(); At that poi

[dom4j-user] Element.createCopy() root problem

2003-12-11 Thread David Thielen
Hi;   Element.createCopy() is not handling XPath as I would expect - it won't accept a "/base" as an argument - it requires "./base"   The code:   public class Dom4jTest {    public static void main(String[] args) throws DocumentException {     System.out.println("starting");     Document doc