/** @see NodeImpl#setOwnerDocument (org.apache.axiom.om.impl.dom.DocumentImpl) */ protected void setOwnerDocument(DocumentImpl document) { this.ownerNode = document; this.isOwned(true); if (document.firstChild == null) { document.firstChild = this; } }
public ElementImpl(ParentNode parentNode, String tagName, NamespaceImpl ns, OMXMLParserWrapper builder, OMFactory factory) { this(tagName, ns, builder, factory); if (parentNode != null) { this.ownerNode = (DocumentImpl) parentNode.getOwnerDocument(); this.isOwned(true); parentNode.addChild(this); } }