/** * 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); }
/** * 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); }