private static void addOrModifyAttribute(Element parent, String name, String value) { final Attribute attribute = parent.attribute( name ); if ( attribute == null ) { parent.addAttribute( name, value ); } else { attribute.setValue( value ); } }
foreignKey.setValue( "none" );
attr.setValue( "plugins/" + canonicalName + "/" + attr.getValue() );
for ( int i = 0; i < elements.size(); i++ ) elements.get( i ).attribute( "order" ).setValue( Integer.toString( i ) );
public Element addAttribute(String name, String value) { Attribute attribute = attribute(name); if (attribute != null) { attribute.setValue(value); } return this; }
public Element addAttribute(QName qName, String value) { Attribute attribute = attribute(qName); if (attribute != null) { attribute.setValue(value); } return this; }
public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr) throws DOMException { Attribute attribute = attribute(newAttr.getNamespaceURI(), newAttr .getLocalName()); if (attribute != null) { attribute.setValue(newAttr.getValue()); } else { attribute = createAttribute(newAttr); add(attribute); } return DOMNodeHelper.asDOMAttr(attribute); }
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { Attribute attribute = attribute(namespaceURI, qualifiedName); if (attribute != null) { attribute.setValue(value); } else { QName qname = getQName(namespaceURI, qualifiedName); addAttribute(qname, value); } }
public Element addAttribute(String name, String value) { // adding a null value is equivalent to removing the attribute Attribute attribute = attribute(name); if (value != null) { if (attribute == null) { add(getDocumentFactory().createAttribute(this, name, value)); } else if (attribute.isReadOnly()) { remove(attribute); add(getDocumentFactory().createAttribute(this, name, value)); } else { attribute.setValue(value); } } else if (attribute != null) { remove(attribute); } return this; }
public Element addAttribute(QName qName, String value) { // adding a null value is equivalent to removing the attribute Attribute attribute = attribute(qName); if (value != null) { if (attribute == null) { add(getDocumentFactory().createAttribute(this, qName, value)); } else if (attribute.isReadOnly()) { remove(attribute); add(getDocumentFactory().createAttribute(this, qName, value)); } else { attribute.setValue(value); } } else if (attribute != null) { remove(attribute); } return this; }
public Element addAttribute(QName qName, String value) { Attribute attribute = attribute(qName); if (attribute != null) { attribute.setValue(value); } return this; }
public Element addAttribute(String name, String value) { Attribute attribute = attribute(name); if (attribute != null) { attribute.setValue(value); } return this; }
public Element addAttribute(String name, String value) { Attribute attribute = attribute(name); if (attribute != null) { attribute.setValue(value); } return this; }
public Element addAttribute(String name, String value) { Attribute attribute = attribute(name); if (attribute != null) { attribute.setValue(value); } return this; }
public Element addAttribute(QName qName, String value) { Attribute attribute = attribute(qName); if (attribute != null) { attribute.setValue(value); } return this; }
public Element addAttribute(QName qName, String value) { Attribute attribute = attribute(qName); if (attribute != null) { attribute.setValue(value); } return this; }
public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr) throws DOMException { Attribute attribute = attribute(newAttr.getNamespaceURI(), newAttr .getLocalName()); if (attribute != null) { attribute.setValue(newAttr.getValue()); } else { attribute = createAttribute(newAttr); add(attribute); } return DOMNodeHelper.asDOMAttr(attribute); }
public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr) throws DOMException { Attribute attribute = attribute(newAttr.getNamespaceURI(), newAttr .getLocalName()); if (attribute != null) { attribute.setValue(newAttr.getValue()); } else { attribute = createAttribute(newAttr); add(attribute); } return DOMNodeHelper.asDOMAttr(attribute); }
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { Attribute attribute = attribute(namespaceURI, qualifiedName); if (attribute != null) { attribute.setValue(value); } else { QName qname = getQName(namespaceURI, qualifiedName); addAttribute(qname, value); } }
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { Attribute attribute = attribute(namespaceURI, qualifiedName); if (attribute != null) { attribute.setValue(value); } else { QName qname = getQName(namespaceURI, qualifiedName); addAttribute(qname, value); } }