import org.w3c.dom.Element;
import org.w3c.dom.Node;
public class Utils {
public static Element getFirstChild(Element e, String local) {
for( Node n=e.getFirstChild(); n!=null; n=n.getNextSibling() ) {
if(n.getNodeType()==Node.ELEMENT_NODE) {
Element c = (Element)n;
if(c.getLocalName().equals(local))
return c;
}
}
return null;
}
}
sources68 the directory containing the programming examples, source code and programming guide online
Saturday, 6 August 2011
Returns the first element that has the specified local name.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment