Code example for Element

Methods: getAttributeNS

	public static boolean getBooleanAttrib(Element element,String attribName,
			String namespaceURI)
		String attribVal=element.getAttributeNS(namespaceURI,attribName);
		return (attribVal!=null ? attribVal.equalsIgnoreCase("true") : false);
	 * Get the parent element of the supplied element having the specified tag 
	 * name. 
	 * @param child 
	 *            Child element. 
	 * @param parentLocalName 
	 *            Parent element local name. 
	 * @return The first parent element of "child" having the tagname 
	 *         "parentName", or null if no such parent element exists. 
Experience pair programming with AI  Get Codota for Java