Java XML Attribute Read getNewAttribute(Element element, String name)

Here you can find the source of getNewAttribute(Element element, String name)

Description

get New Attribute

License

Open Source License

Declaration

public static Attr getNewAttribute(Element element, String name) 

Method Source Code

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

import org.w3c.dom.Attr;
import org.w3c.dom.Element;

public class Main {
    public static Attr getNewAttribute(Element element, String name) {
        String safeName = name.replaceAll("\\$", "::");
        return element.getOwnerDocument().createAttribute(safeName);
    }/*ww  w  . j  a  va 2 s .com*/
}

Related

  1. getLong(String attrName, Map runtimeAttributes, Node docElement)
  2. getLongAttribute(NamedNodeMap namedNodeMap, String name)
  3. getLongAttribute(String name, Element el)
  4. getNameAttribute(final Node aNode)
  5. getNamedAttribute(final Node aNode, final String attributeName)
  6. getNSPrefixFromNSAttr(Attr a)
  7. getNullableAttribute(final Element node, final String attributeName)
  8. getNullSafe(NamedNodeMap attr, String key)
  9. getOptionalAttribute(Element elt, String name)