Code example for Attr

Methods: getChildNodes

0
		if (weeks == null) 
			return ""; 
		Attr last = weeks.getAttributeNode("last"); 
		if (last == null) 
			return ""; 
		String lastValue = last.getChildNodes().item(0).getNodeValue(); 
		if (lastValue == null) 
			lastValue = ""; 
		 
		return lastValue; 
	} 
	 
	private long getNumberOfWeeks(Document doc) { 
		Element weeks = getWeeksNode(doc); 
		if (weeks == null) 
			return 0; 
		NodeList nl = weeks.getElementsByTagName("week"); 
		if (nl == null) 
			return 0; 
		if (nl.getLength() == 0)  
Connect your IDE to all the code out there  Get Codota for Java