Java XML Attribute Get getAttribute(Node node, String attr)

Here you can find the source of getAttribute(Node node, String attr)

Description

get Attribute

License

Open Source License

Declaration

public static Node getAttribute(Node node, String attr) 

Method Source Code

//package com.java2s;
/*/*from  www.  ja v a 2s  . c o  m*/
 * Copyright 2013 Carnegie Mellon University
 * 
    
 * Any opinions, findings and conclusions or recommendations expressed in this 
 * Material are those of the author(s) and do not necessarily reflect the 
 * views of the United States Department of Defense. 
    
 * NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING 
 * INSTITUTE MATERIAL IS FURNISHED ON AN ?AS-IS? BASIS. CARNEGIE MELLON 
 * UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 
 * AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR 
 * PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF 
 * THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF 
 * ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT 
 * INFRINGEMENT.
 * 
 * This Material has been approved for public release and unlimited 
 * distribution except as restricted below. 
 * 
 * This Material is provided to you under the terms and conditions of the 
 * Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is 
 * provided with this Content and is also available at 
 * http://www.eclipse.org/legal/epl-v10.html.
 * 
 * Carnegie Mellon is registered in the U.S. Patent and Trademark 
 * Office by Carnegie Mellon University. 
 * 
 */

import org.w3c.dom.Node;

public class Main {
    public static Node getAttribute(Node node, String attr) {
        return node.getAttributes().getNamedItem(attr);
    }
}

Related

  1. getAttribute(Node n, String name)
  2. getAttribute(Node node, String att_name)
  3. getAttribute(Node node, String attName, boolean domLevel3)
  4. getAttribute(Node node, String attr)
  5. getAttribute(Node node, String attr)
  6. getAttribute(Node node, String attr)
  7. getAttribute(Node node, String attribName)
  8. getAttribute(Node node, String attribute)
  9. getAttribute(Node node, String attributeName)