示例#1
0
 /**
  * Retrieves an attribute node by name.
  *
  * @param name the name of the attribute to retrieve
  * @return the XMLAttr node with the specified name or <code>null</code> if there is no such
  *     attribute
  */
 @JsxFunction
 public Object getAttributeNode(final String name) {
   final Map<String, DomAttr> attributes = getDomNodeOrDie().getAttributesMap();
   for (final DomAttr attr : attributes.values()) {
     if (attr.getName().equals(name)) {
       return attr.getScriptObject();
     }
   }
   return null;
 }