Android examples for XML:XML Attribute
get XML Attribute Node from Node by attribute name
// Copyright (c) 2004-2008 IBM Corporation and others. All Rights Reserved. //package com.java2s; import org.w3c.dom.*; public class Main { public static Node getAttributeNode(Node sNode, String attribName) { NamedNodeMap attrs = sNode.getAttributes(); if (attrs != null) { return attrs.getNamedItem(attribName); }/* w w w . j a va 2 s . co m*/ return null; } }