public Node adoptNode(Node node) throws DOMException { //OK... I'm cheating here, a BIG TODO return this.importNode(node, true); }
public void addChild(OMNode omNode) { if (omNode.getOMFactory() instanceof OMDOMFactory) { Node domNode = (Node) omNode; if (this.ownerNode != null && !domNode.getOwnerDocument().equals(this.ownerNode)) { this.appendChild(this.ownerNode.importNode(domNode, true)); } else { this.appendChild(domNode); } } else { addChild(importNode(omNode)); } }
public void applyPolicy(AxisDescription axisDescription, Element policy) { try { OMElement policyElement = (OMElement) new OMDOMFactory().getDocument().importNode(policy, true); axisDescription.applyPolicy(PolicyEngine.getPolicy(policyElement)); } catch (Exception e) { // TODO Handle exception properly throw new AssertionError(e); } }
&& !attr.getNamespaceURI().equals( OMConstants.XMLNS_NS_URI)) { Attr newAttr = (Attr) importNode(attr, true); newElement.setAttributeNodeNS(newAttr); } else { // if (attr.getLocalName() == null) { Attr newAttr = (Attr) importNode(attr, true); newElement.setAttributeNode(newAttr); for (Node srckid = importedNode.getFirstChild(); srckid != null; srckid = srckid.getNextSibling()) { newNode.appendChild(importNode(srckid, true));
OMElement receivedKeyInfoElem = (OMElement) new OMDOMFactory().getDocument().importNode(keyInfo, true);
OMElement receivedKeyInfoElem = (OMElement) new OMDOMFactory().getDocument().importNode(keyInfo, true);
rsaKey = val.getRSAKeyValue(); elem = rsaKey.getDOM(); omElem = (OMElement) new OMDOMFactory().getDocument().importNode(elem, true); modElem = (Element) omElem.getFirstChildWithName(Modulus.DEFAULT_ELEMENT_NAME); expElem = (Element) omElem.getFirstChildWithName(Exponent.DEFAULT_ELEMENT_NAME);
.getDocumentElement(); newElement.build(); return (OMNode) this.ownerNode.importNode((Element) newElement, true);