private WsitDocument() throws ParserConfigurationException { DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); dbfac.setNamespaceAware(true); dbfac.setValidating(false); docBuilder = dbfac.newDocumentBuilder(); docMerger = new DocumentMerger(); }
/** * Merge the mergeSource element into the target element. The * elements must have the same namespace and localname in order * for the merge to proceede. An exception will be thrown if the * target and mergeSource elements do not have the same namespace * and localname. * * @param target destination element * @param mergeSource source element */ public void merge(Element target, Element mergeSource) { if (!matchSimpleNS(target, mergeSource)) { throw new IllegalArgumentException("The target and merge elements are not the same"); } mergeRecursive(target, mergeSource); }
Element targetMatch = findMatchingChild(target, mergeChild); mergeRecursive(targetMatch, mergeChild);
public void mergePolicy(Document policy) throws SAXException, IOException { mergePolicyIds(policy); docMerger.merge(doc.getDocumentElement(), policy.getDocumentElement()); }
Element targetMatch = getChildElementNS(parent, example.getNamespaceURI(), example.getLocalName()); if (null != targetMatch)
Element targetMatch = findMatchingChild(target, mergeChild); mergeRecursive(targetMatch, mergeChild);
public void mergePolicy(Document policy) throws SAXException, IOException { mergePolicyIds(policy); docMerger.merge(doc.getDocumentElement(), policy.getDocumentElement()); }
Element targetMatch = getChildElementNS(parent, example.getNamespaceURI(), example.getLocalName()); if (null != targetMatch)
/** * Merge the mergeSource element into the target element. The * elements must have the same namespace and localname in order * for the merge to proceede. An exception will be thrown if the * target and mergeSource elements do not have the same namespace * and localname. * * @param target destination element * @param mergeSource source element */ public void merge(Element target, Element mergeSource) { if (!matchSimpleNS(target, mergeSource)) { throw new IllegalArgumentException("The target and merge elements are not the same"); } mergeRecursive(target, mergeSource); }
private WsitDocument() throws ParserConfigurationException { DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); dbfac.setNamespaceAware(true); dbfac.setValidating(false); docBuilder = dbfac.newDocumentBuilder(); docMerger = new DocumentMerger(); }