@Test public void testReplaceNode() throws Exception { ReplaceNode rn = new ReplaceNode(XPATH_ROOT_NODE); Document original = XmlHelper.createDocument(ORIGINAL); Document newDoc = XmlHelper.createDocument(REPLACEMENT); Document merged = rn.merge(original, newDoc); XmlUtils xml = new XmlUtils(); xml.setSource(merged); assertNotNull(xml.getSingleTextItem(XPATH_ROOT_NODE)); assertNotSame(DATA_A, xml.getSingleTextItem(XPATH_ROOT_NODE)); assertEquals(DATA_B, xml.getSingleTextItem(XPATH_ROOT_NODE)); }
public ReplaceNode() { }
ReplaceNode extends XpathMergeImpl { public ReplaceNode() { } }
ReplaceNode extends XpathMergeImpl { public ReplaceNode() { } ReplaceNode();  ReplaceNode(String xpath); }
ReplaceNode extends XpathMergeImpl { public ReplaceNode() { } ReplaceNode();  ReplaceNode(String xpath); @Override Document merge(Document original, Document newDoc); String getXpathToNode(); void setXpathToNode(String xpath); }
ReplaceNode extends XpathMergeImpl { public ReplaceNode() { } ReplaceNode();  ReplaceNode(String xpath); @Override Document merge(Document original, Document newDoc); String getXpathToNode(); void setXpathToNode(String xpath);  }