@Override public Node removeChild(Node oldChild) throws DOMException { onRemoveNode(oldChild); return super.removeChild(oldChild); }
/** * NON-DOM: a factory method used by the Xerces DOM parser * to create an element. * * @param namespaceURI The namespace URI of the element to * create. * @param qualifiedName The qualified name of the element type to * instantiate. * @param localpart The local name of the attribute to instantiate. * * @return Element A new Element object with the following attributes: * @exception DOMException INVALID_CHARACTER_ERR: Raised if the specified * name contains an invalid character. */ public Element createElementNS(String namespaceURI, String qualifiedName, String localpart) throws DOMException { return new ElementNSImpl(this, namespaceURI, qualifiedName, localpart); }
void rename(String namespaceURI, String qualifiedName) { if (needsSyncData()) { synchronizeData(); } this.name = qualifiedName; setName(namespaceURI, qualifiedName); reconcileDefaultAttributes(); }
/** * Introduced in DOM Level 2. <p> * * Returns the local part of the qualified name of this node. * @since WD-DOM-Level-2-19990923 */ public String getLocalName() { if (needsSyncData()) { synchronizeData(); } return localName; }
throws DOMException if (needsSyncData()) { synchronizeData(); if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(
while (child != null) { el.removeChild(child); nel.appendChild(child); child = el.getFirstChild(); nel.moveSpecifiedAttributes(el);
if (el instanceof ElementNSImpl) { if (canRenameElements(namespaceURI, name, el)) { ((ElementNSImpl) el).rename(namespaceURI, name);
@Override public Node insertBefore(Node newChild, Node refChild) throws DOMException { onInsertNode(newChild); return super.insertBefore(newChild, refChild); }
@Override public Node replaceChild(Node newChild, Node oldChild) throws DOMException { onInsertNode(newChild); onRemoveNode(oldChild); return super.replaceChild(newChild, oldChild); }
/** * Introduced in DOM Level 2. <p> * * The namespace URI of this node, or null if it is unspecified.<p> * * This is not a computed value that is the result of a namespace lookup based on * an examination of the namespace declarations in scope. It is merely the * namespace URI given at creation time.<p> * * For nodes created with a DOM Level 1 method, such as createElement * from the Document interface, this is null. * @since WD-DOM-Level-2-19990923 */ public String getNamespaceURI() { if (needsSyncData()) { synchronizeData(); } return namespaceURI; }
@Override public Node insertBefore(Node newChild, Node refChild) throws DOMException { onInsertNode(newChild); return super.insertBefore(newChild, refChild); }
@Override public Node replaceChild(Node newChild, Node oldChild) throws DOMException { onInsertNode(newChild); onRemoveNode(oldChild); return super.replaceChild(newChild, oldChild); }
/** * Introduced in DOM Level 2. <p> * * The namespace prefix of this node, or null if it is unspecified. <p> * * For nodes created with a DOM Level 1 method, such as createElement * from the Document interface, this is null. <p> * * @since WD-DOM-Level-2-19990923 */ public String getPrefix() { if (needsSyncData()) { synchronizeData(); } int index = name.indexOf(':'); return index < 0 ? null : name.substring(0, index); }
/** * Introduced in DOM Level 2. <p> * Creates an element of the given qualified name and namespace URI. * If the given namespaceURI is null or an empty string and the * qualifiedName has a prefix that is "xml", the created element * is bound to the predefined namespace * "http://www.w3.org/XML/1998/namespace" [Namespaces]. * @param namespaceURI The namespace URI of the element to * create. * @param qualifiedName The qualified name of the element type to * instantiate. * @return Element A new Element object with the following attributes: * @throws DOMException INVALID_CHARACTER_ERR: Raised if the specified * name contains an invalid character. * @throws DOMException NAMESPACE_ERR: Raised if the qualifiedName has a * prefix that is "xml" and the namespaceURI is * neither null nor an empty string nor * "http://www.w3.org/XML/1998/namespace", or * if the qualifiedName has a prefix different * from "xml" and the namespaceURI is null or an * empty string. * @since WD-DOM-Level-2-19990923 */ public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException { return new ElementNSImpl(this, namespaceURI, qualifiedName); }
@Override public Node removeChild(Node oldChild) throws DOMException { onRemoveNode(oldChild); return super.removeChild(oldChild); }
@Override public Node insertBefore(Node newChild, Node refChild) throws DOMException { onInsertNode(newChild); return super.insertBefore(newChild, refChild); }
@Override public Node replaceChild(Node newChild, Node oldChild) throws DOMException { onInsertNode(newChild); onRemoveNode(oldChild); return super.replaceChild(newChild, oldChild); }
@Override public Node removeChild(Node oldChild) throws DOMException { onRemoveNode(oldChild); return super.removeChild(oldChild); }