reads a XML Element Attribute ans cast it to a boolean value

@param el XML Element to read Attribute from it
@param attributeName Name of the Attribute to read
@return Attribute Value
979254
public boolean toBoolean(Element el, String attributeName) {
	return Caster.toBooleanValue(el.getAttribute(attributeName), false);
    }
1259926
public final long getAttributeValueAsLong(String attributeName) {
    Attribute attribute = getAttribute(attributeName);
    if (attribute == null) {
      return 0;
    }
    else {
      try {
        return attribute.getLongValue();
      }
      catch (DataConversionException ex) {
        return 0;
      }
    }
  }
1310410
public AttributeInfoEx getAttributeInfo(String attributeName) {
        for (AttributeInfoEx attributeInfoEx : attributeInfoList)
            if (attributeInfoEx.name.toLowerCase().equals(attributeName.toLowerCase()))
                return attributeInfoEx;
        return null;
    }
1336500
public static Boolean getAttributeBoolean(Tag tag, String attrName) throws EvaluatorException {
	Boolean b = getAttributeLiteral(tag, attrName).getBoolean(null);
	if (b == null) throw new EvaluatorException("attribute [" + attrName + "] must be a constant boolean value");
	return b;
    }
868003
public Attribute getChild(String attrName) {
    Iterable<Attribute> attrParts = getEntities(CHILDREN, Attribute.class);
    return Streams.stream(attrParts)
        .filter(attrPart -> attrPart.getName().equals(attrName))
        .findFirst()
        .orElse(null);
  }
120317
public String getAttribute(String attributeName) {
		if (attributeName != null){
			return this.attributes.get(attributeName);
		}
		
		return null;
	}
164857
protected boolean isSafeAttribute(String tagName, Element el, Attribute attr) {
        TagName tag = TagName.valueOf(tagName);
        AttributeKey key = AttributeKey.valueOf(attr.getKey());

        Set<AttributeKey> okSet = attributes.get(tag);
        if (okSet != null && okSet.contains(key)) {
            if (protocols.containsKey(tag)) {
                Map<AttributeKey, Set<Protocol>> attrProts = protocols.get(tag);
                // ok if not defined protocol; otherwise test
                return !attrProts.containsKey(key) || testValidProtocol(el, attr, attrProts.get(key));
            } else { // attribute found, no protocols defined, so OK
                return true;
            }
        }
        // might be an enforced attribute?
        Map<AttributeKey, AttributeValue> enforcedSet = enforcedAttributes.get(tag);
        if (enforcedSet != null) {
            Attributes expect = getEnforcedAttributes(tagName);
            String attrKey = attr.getKey();
            if (expect.hasKeyIgnoreCase(attrKey)) {
                return expect.getIgnoreCase(attrKey).equals(attr.getValue());
            }
        }
        // no attributes defined for tag, try :all tag
        return !tagName.equals(":all") && isSafeAttribute(":all", el, attr);
    }
875327
public static ResultAttribute valueOf(@Nonnull String attributeName) {
		ResultAttribute value;
		switch (attributeName) {
			case "TYPE_NAME":
				value = TYPE_NAME;
				break;
			case "OBJ_DOMAIN":
				value = OBJ_DOMAIN;
				break;
			case "CLASS_NAME":
				value = CLASS_NAME;
				break;
			case "ATTRIBUTE_NAME":
				value = ATTRIBUTE_NAME;
				break;
			default:
				throw new IllegalArgumentException("Invalid value " + attributeName);
		}
		return value;
	}
237772
public StringBuffer readFile(String filename) throws IOException {
		BufferedReader reader = new BufferedReader(new FileReader(filename));
		StringBuffer xml = new StringBuffer();
		String line = null;
        while((line = reader.readLine()) != null){
            xml.append(line);
        }
		reader.close();
		return xml;
	}
1176313
private <T> T read(final Class<T> rootType) throws Exception {
        StartElement start = advanceToStartElement();
        if (start.getName().equals(BEAN_QNAME) == false) {
            throw new IllegalArgumentException("Expected root element 'bean' but found '" + start.getName() + "'");
        }
        Attribute attr = start.getAttributeByName(TYPE_QNAME);
        if (attr == null && rootType == Bean.class) {
            throw new IllegalArgumentException("Root element attribute must specify '" + TYPE + "'");
        }
        Class<?> effectiveType = rootType;
        if (attr != null) {
            String typeStr = attr.getValue();
            effectiveType = SerTypeMapper.decodeType(typeStr, settings, null, knownTypes);
            if (rootType.isAssignableFrom(effectiveType) == false) {
                throw new IllegalArgumentException("Specified root type is incompatible with XML root type: " + rootType.getName() + " and " + effectiveType.getName());
            }
        }
        if (Bean.class.isAssignableFrom(effectiveType) == false) {
            throw new IllegalArgumentException("Root type is not a Joda-Bean: " + effectiveType.getName());
        }
        basePackage = effectiveType.getPackage().getName() + ".";
        Object parsed = parseBean(effectiveType);
        return rootType.cast(parsed);
    }
968147
public String get(String attributeName, String attributeNamespace) {
        return attributes.get(new XAttributeName(attributeName, attributeNamespace, null));
    }
599669
protected function getAttribute(BBcodeElementNodeInterface $el, $attribute)
    {
        $attributes = $el->getAttribute();

        if (isset($attributes[self::TAG_NAME])) {
            $attributes = json_decode($attributes[self::TAG_NAME]);
            if (isset($attributes->$attribute)) {

                return $attributes->$attribute;
            }
        }

        return '';
    }
536465
public boolean searchElement(String elementName) throws XMLException, IOException {
		try {
			do {
				if (Type.START_ELEMENT.equals(event.type)) {
					if (event.text.equals(elementName))
						return true;
				}
				next();
			} while (true);
		} catch (EOFException e) {
			return false;
		}
	}
293072
def findElementByAttributeValue( elements, attribute_name, attribute_value )
      element = nil
      if elements
          if elements.is_a?( REXML::Element )
            elements.each_element_with_attribute( attribute_name, attribute_value ) { |e|  element = e }
          elsif elements.is_a?( Array )
            elements.each{ |e|
              if e.is_a?( REXML::Element ) and e.attributes[ attribute_name ] == attribute_value
                element = e
              end
            }
          end
      end
      element
   end
1153409
public Attribute getAttribute(final String attributeName) {
		final Attribute a = attributes.get(attributeName);
		if (a == null)
			throw new IllegalArgumentException("Attribute " + attributeName + " doesn't exists");
		return a;
	}
123785
public Attribute<T, Serializable> getAttribute(String fieldname) {
        if (fieldname == null) return null;
        return this.attributeMap.get(fieldname);
    }
191010
public Object getAttributeValue(String attributeName) {
		Attribute attribute = getAllAttributes().get(attributeName);
		if (attribute != null) {
			return attribute.getValue();
		}
		return null;
	}