Java XML Attribute Set setAttributeValue(Node node, String attName, String attValue)

Here you can find the source of setAttributeValue(Node node, String attName, String attValue)

Description

set Attribute Value

License

Open Source License

Declaration

public static void setAttributeValue(Node node, String attName, String attValue) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Node;

public class Main {
    public static void setAttributeValue(Node node, String attName, String attValue) {
        Node attr = node.getAttributes().getNamedItem(attName);
        attr.setNodeValue(attValue);/*from   w w w  . jav a2s .c  o m*/
    }
}

Related

  1. setAttribute(Node pNode, String attrName)
  2. setAttribute(String name, String value, Element el)
  3. setAttributeNS(Element node, String namespaceURI, String prefix, String nodeName, String value)
  4. setAttributeValue(Element element, String attribute, String value)
  5. setAttributeValue(final Element target, final String attributeName, final String value)
  6. setAttributeValue(Node node, String attribute, String value)
  7. setAttributeValue(Node sNode, String attribName, String val)
  8. setPropertyIfAttributePresent( BeanDefinitionBuilder builder, Element element, String attributeName)
  9. setPropertyReference(BeanDefinitionBuilder builder, Element element, String attribute, String property)