@Test public void testInsertNode() throws Exception { InsertNode rn = new InsertNode(XPATH_ROOT); Document merged = rn.merge(XmlHelper.createDocument(ORIGINAL), XmlHelper.createDocument(REPLACEMENT)); XmlUtils xml = new XmlUtils(); xml.setSource(merged); assertNotNull(xml.getSingleTextItem(XPATH_ORIGINAL_NODE)); assertEquals(DATA_A, xml.getSingleTextItem(XPATH_ORIGINAL_NODE)); assertEquals(DATA_B, xml.getSingleTextItem(XPATH_NEW_NODE)); }
public InsertNode() { }
InsertNode extends XpathMergeImpl { public InsertNode() { } }
InsertNode extends XpathMergeImpl { public InsertNode() { } InsertNode();  InsertNode(String xpath); }
InsertNode extends XpathMergeImpl { public InsertNode() { } InsertNode();  InsertNode(String xpath); @Override Document merge(Document original, Document newDoc); String getXpathToParentNode(); void setXpathToParentNode(String xpath); }
InsertNode extends XpathMergeImpl { public InsertNode() { } InsertNode();  InsertNode(String xpath); @Override Document merge(Document original, Document newDoc); String getXpathToParentNode(); void setXpathToParentNode(String xpath);  }