/** * <b>DOM</b>: Implements {@link org.w3c.dom.Attr#getName()}. * @return {@link #getNodeName()}. */ public String getName() { return getNodeName(); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Attr#getName()}. * @return {@link #getNodeName()}. */ public String getName() { return getNodeName(); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Attr#getName()}. * @return {@link #getNodeName()}. */ public String getName() { return getNodeName(); }
/** * Checks the validity of a node to be inserted. */ protected void checkChildType(Node n, boolean replace) { switch (n.getNodeType()) { case TEXT_NODE: case ENTITY_REFERENCE_NODE: case DOCUMENT_FRAGMENT_NODE: break; default: throw createDOMException (DOMException.HIERARCHY_REQUEST_ERR, "child.type", new Object[] { new Integer(getNodeType()), getNodeName(), new Integer(n.getNodeType()), n.getNodeName() }); } }
/** * Checks the validity of a node to be inserted. */ protected void checkChildType(Node n, boolean replace) { switch (n.getNodeType()) { case TEXT_NODE: case ENTITY_REFERENCE_NODE: case DOCUMENT_FRAGMENT_NODE: break; default: throw createDOMException (DOMException.HIERARCHY_REQUEST_ERR, "child.type", new Object[] {(int) getNodeType(), getNodeName(), (int) n.getNodeType(), n.getNodeName() }); } }
/** * Checks the validity of a node to be inserted. */ protected void checkChildType(Node n, boolean replace) { switch (n.getNodeType()) { case TEXT_NODE: case ENTITY_REFERENCE_NODE: case DOCUMENT_FRAGMENT_NODE: break; default: throw createDOMException (DOMException.HIERARCHY_REQUEST_ERR, "child.type", new Object[] {(int) getNodeType(), getNodeName(), (int) n.getNodeType(), n.getNodeName() }); } }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNode(Attr,boolean)}. */ public void setIdAttributeNode( Attr attr, boolean isId ) throws DOMException { AbstractAttr a = (AbstractAttr)attr; if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNode(Attr,boolean)}. */ public void setIdAttributeNode( Attr attr, boolean isId ) throws DOMException { AbstractAttr a = (AbstractAttr)attr; if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNode(Attr,boolean)}. */ public void setIdAttributeNode( Attr attr, boolean isId ) throws DOMException { AbstractAttr a = (AbstractAttr)attr; if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNS(String,String,boolean)}. */ public void setIdAttributeNS( String ns, String ln, boolean isId ) throws DOMException { if ( ns != null && ns.length() == 0 ) { ns = null; } AbstractAttr a = (AbstractAttr)getAttributeNodeNS( ns, ln ); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { ns, ln }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNS(String,String,boolean)}. */ public void setIdAttributeNS( String ns, String ln, boolean isId ) throws DOMException { if ( ns != null && ns.length() == 0 ) { ns = null; } AbstractAttr a = (AbstractAttr)getAttributeNodeNS( ns, ln ); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { ns, ln }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements * {@link org.w3c.dom.Element#setIdAttributeNS(String,String,boolean)}. */ public void setIdAttributeNS( String ns, String ln, boolean isId ) throws DOMException { if ( ns != null && ns.length() == 0 ) { ns = null; } AbstractAttr a = (AbstractAttr)getAttributeNodeNS( ns, ln ); if (a == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, "attribute.missing", new Object[] { ns, ln }); } if (a.isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { a.getNodeName() }); } updateIdEntry(a, isId); a.isIdAttr = isId; }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setNodeValue(String)}. */ public void setNodeValue(String nodeValue) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() }); } String s = getNodeValue(); // Remove all the children Node n; while ((n = getFirstChild()) != null) { removeChild(n); } String val = (nodeValue == null) ? "" : nodeValue; // Create and append a new child. n = getOwnerDocument().createTextNode(val); appendChild(n); if (ownerElement != null) { ownerElement.fireDOMAttrModifiedEvent(nodeName, this, s, val, MutationEvent.MODIFICATION); } }
fireDOMAttrModifiedEvent( n.getNodeName(), n, n.getNodeValue(), "", MutationEvent.REMOVAL ); return n;
fireDOMAttrModifiedEvent( n.getNodeName(), n, n.getNodeValue(), "", MutationEvent.REMOVAL ); return n;
fireDOMAttrModifiedEvent( n.getNodeName(), n, n.getNodeValue(), "", MutationEvent.REMOVAL ); return n;
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setNodeValue(String)}. */ public void setNodeValue(String nodeValue) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] {(int) getNodeType(), getNodeName() }); } String s = getNodeValue(); // Remove all the children Node n; while ((n = getFirstChild()) != null) { removeChild(n); } String val = (nodeValue == null) ? "" : nodeValue; // Create and append a new child. n = getOwnerDocument().createTextNode(val); appendChild(n); if (ownerElement != null) { ownerElement.fireDOMAttrModifiedEvent(nodeName, this, s, val, MutationEvent.MODIFICATION); } }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#setNodeValue(String)}. */ public void setNodeValue(String nodeValue) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "readonly.node", new Object[] {(int) getNodeType(), getNodeName() }); } String s = getNodeValue(); // Remove all the children Node n; while ((n = getFirstChild()) != null) { removeChild(n); } String val = (nodeValue == null) ? "" : nodeValue; // Create and append a new child. n = getOwnerDocument().createTextNode(val); appendChild(n); if (ownerElement != null) { ownerElement.fireDOMAttrModifiedEvent(nodeName, this, s, val, MutationEvent.MODIFICATION); } }
fireDOMAttrModifiedEvent( n.getNodeName(), n, n.getNodeValue(), "", MutationEvent.REMOVAL );
fireDOMAttrModifiedEvent( n.getNodeName(), n, n.getNodeValue(), "", MutationEvent.REMOVAL );