/** * NON-DOM: a factory method used by the Xerces DOM parser * to create an element. * * @param namespaceURI The namespace URI of the attribute to * create. When it is null or an empty string, * this method behaves like createAttribute. * @param qualifiedName The qualified name of the attribute to * instantiate. * @param localpart The local name of the attribute to instantiate. * * @return Attr A new Attr object. * @throws DOMException INVALID_CHARACTER_ERR: Raised if the specified * name contains an invalid character. */ public Attr createAttributeNS(String namespaceURI, String qualifiedName, String localpart) throws DOMException { return new AttrNSImpl(this, namespaceURI, qualifiedName, localpart); }
/** * Introduced in DOM Level 2. <p> * Creates an attribute 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 attribute to * create. When it is null or an empty string, * this method behaves like createAttribute. * @param qualifiedName The qualified name of the attribute to * instantiate. * @return Attr A new Attr object. * @throws DOMException INVALID_CHARACTER_ERR: Raised if the specified * name contains an invalid character. * @since WD-DOM-Level-2-19990923 */ public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { return new AttrNSImpl(this, namespaceURI, qualifiedName); }