Here you can find the source of getAttribute(String name, Element firstElement, Element secondElement)
Parameter | Description |
---|---|
firstElement | a parameter |
secondElement | a parameter |
private static String getAttribute(String name, Element firstElement, Element secondElement)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; public class Main { /**/* www.j a v a2s . c o m*/ * Try to get an attribute value from two elements. * * @param firstElement * @param secondElement * @return attribute value */ private static String getAttribute(String name, Element firstElement, Element secondElement) { String val = firstElement.getAttribute(name); if (val.length() == 0 && secondElement != null) { val = secondElement.getAttribute(name); } return val; } }