* @param childName - the node name to be located
* @return the child node with name matching 'childName', null if not found
*/
protected XSDNode findChildNode(XSDElement parent, String childName) {
XSDNode[] children;
XSDNode node = null;
boolean successful = false;
// get the parent node's children
children = ((XSDComplexType)parent.getType()).getElementSet();
// iterate over child nodes looking for the child
for (int i = 0; i < children.length; i++) {
node = children[i];
if (node.getName().equals(childName)) {
successful = true;
break;
}
}