Here you can find the source of hasChild(Element start, String name)
Parameter | Description |
---|---|
start | __UNDOCUMENTED__ |
name | __UNDOCUMENTED__ |
public static boolean hasChild(Element start, String name)
//package com.java2s; /*// w ww . j av a 2 s . c o m * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ import org.w3c.dom.*; public class Main { /** * __UNDOCUMENTED__ * * @param start __UNDOCUMENTED__ * @param name __UNDOCUMENTED__ * @return __UNDOCUMENTED__ */ public static boolean hasChild(Element start, String name) { NodeList nl = start.getChildNodes(); int len = nl.getLength(); Node n = null; for (int i = 0; i < len; i++) { n = nl.item(i); if (n.getNodeName().equals(name)) { return true; } } return false; } }