Android XML Attribute Get getAttribute(String key, Attributes attributes, Map tagCache)

Here you can find the source of getAttribute(String key, Attributes attributes, Map tagCache)

Description

get Attribute

License

Open Source License

Declaration

public static String getAttribute(String key, Attributes attributes,
            Map<String, Integer> tagCache) 

Method Source Code

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

import java.util.Map;
import org.xml.sax.Attributes;

public class Main {
    public static String getAttribute(String key, Attributes attributes,
            Map<String, Integer> tagCache) {
        Integer value = tagCache.get(key);
        if (null == value || value.intValue() == -1) {
            return null;
        } else {/*from www. j a  v  a2 s .c om*/
            return attributes.getValue(value);
        }
    }
}

Related

  1. extractAttributesFromTag(String tag)
  2. getAttributesValue(Attributes attrs, String name)
  3. getXmlAttribute(Context context, XmlResourceParser xml, String name)
  4. getNodeAttributeOrDefault(Node node, String name, String defaultValue)
  5. getNodeAttributeOrFail( Node node, String name, ExceptionType e)