Example usage for org.jdom2 Element getAttributeValue

List of usage examples for org.jdom2 Element getAttributeValue

Introduction

In this page you can find the example usage for org.jdom2 Element getAttributeValue.

Prototype

public String getAttributeValue(final String attname) 

Source Link

Document

This returns the attribute value for the attribute with the given name and within no namespace, null if there is no such attribute, and the empty string if the attribute value is empty.

Usage

From source file:com.gmapp.comun.LeerPathFromXML.java

public String cargarXml(String tipoPathBuscado) {
    //System.out.println("Buscando path para \"" + tipoPathBuscado + "\" ...");
    String pathBuscado = "";
    //Se crea un SAXBuilder para poder parsear el archivo
    SAXBuilder builder = new SAXBuilder();

    InputStream xmlFile = getClass().getResourceAsStream("/xml/pathFiles.xml");

    try {//from w  ww . j a v  a 2s. c  o m

        //Se crea el documento a traves del archivo
        Document document = (Document) builder.build(xmlFile);

        //Se obtiene la raiz 'Sistemas'
        Element rootNode = document.getRootElement();

        //Se obtiene la lista de hijos de la raiz 'Sistemas'
        List list = rootNode.getChildren("Sistema");

        //Se recorre la lista de hijos de 'Sistemas'
        for (int i = 0; i < list.size(); i++) {
            //Se obtiene el elemento 'Sistema'
            Element sistema = (Element) list.get(i);

            //Se obtiene el atributo 'nombre' que esta en el tag 'Sistema'
            String nombreSistema = sistema.getAttributeValue("nombre");
            if (SysOper.contains(nombreSistema)) {
                //System.out.println("Sistema: " + nombreSistema );
                //Se obtiene la lista de hijos del tag 'Sistema~nombre '
                List lista_registros = sistema.getChildren();
                //Se recorre la lista de campos
                for (int j = 0; j < lista_registros.size(); j++) {
                    //Se obtiene el elemento 'campo'
                    Element campo = (Element) lista_registros.get(j);
                    //Se obtienen los valores que estan entre los tags '<campo></campo>'
                    //Se obtiene el valor que esta entre los tags '<nombre></nombre>'
                    String nombre = campo.getChildTextTrim("nombrePath");
                    if (nombre.equals(tipoPathBuscado)) {
                        //Se obtiene el valor que esta entre los tags '<valor></valor>'
                        pathBuscado = campo.getChildTextTrim("path");

                        //System.out.println( "\t"+nombre+"\t"+pathBuscado);
                    }
                }
            }
        }
    } catch (IOException io) {
        System.out.println(io.getMessage());
    } catch (JDOMException jdomex) {
        System.out.println(jdomex.getMessage());
    }

    return pathBuscado;
}

From source file:com.hpe.application.automation.tools.octane.actions.UFTParameterFactory.java

License:Open Source License

public static Collection<UFTParameter> convertApiTestXmlToArguments(File parametersFile,
        boolean isInputParameters) throws IOException {

    /*<TestParameters>
    <Schema>/*  w w w .j av a 2s .  c om*/
        <xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:types="http://hp.vtd.schemas/types/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xs:import schemaLocation="../../../dat/schemas/Types.xsd" namespace="http://hp.vtd.schemas/types/v1.0" />
            <xs:element types:displayName="Parameters" name="Arguments">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element types:masked="false" name="StartParam1" type="xs:long">
                            <xs:annotation>
                                <xs:documentation />
                            </xs:annotation>
                        </xs:element>
                        <xs:element types:masked="false" name="endParam1" type="xs:string">
                            <xs:annotation>
                                <xs:documentation />
                            </xs:annotation>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xsd:schema>
    </Schema>
    <Values>
        <Arguments>
            <StartParam1>1</StartParam1>
            <endParam1>f</endParam1>
        </Arguments>
    </Values>
    </TestParameters>*/

    try {
        SAXBuilder saxBuilder = new SAXBuilder(XMLReaders.NONVALIDATING, null, null);
        Document document = saxBuilder.build(parametersFile);
        Element rootElement = document.getRootElement();

        Map<String, UFTParameter> uftParametersMap = new HashMap<>();
        List<Element> argElements = getHierarchyChildElement(rootElement, "Schema", "schema", "element",
                "complexType", "sequence").getChildren();
        for (Element argElement : argElements) {
            String name = argElement.getAttributeValue("name");
            String type = argElement.getAttributeValue("type").replace("xs:", "");
            int direction = isInputParameters ? 0 : 1;

            UFTParameter parameter = new UFTParameter();
            parameter.setArgName(name);
            parameter.setArgType(type);
            parameter.setArgDirection(direction);
            uftParametersMap.put(parameter.getArgName(), parameter);
        }

        //getArg default values
        List<Element> argDefValuesElements = getHierarchyChildElement(rootElement, "Values", "Arguments")
                .getChildren();
        for (Element argElement : argDefValuesElements) {
            UFTParameter parameter = uftParametersMap.get(argElement.getName());
            if (parameter != null) {
                parameter.setArgDefaultValue(argElement.getValue());
            }
        }

        return uftParametersMap.values();
    } catch (Exception e) {
        logger.severe(e.getMessage());
    }
    return Collections.emptySet();
}

From source file:com.init.octo.schema.XsdAll.java

License:Open Source License

/**
 * This method builds a ALL element/*from ww  w.  ja v  a  2 s  .  co m*/
 *
 * @param    root - the ALL element that defines this element
 * @param    cache - a list of pre-defined XML types
 */

public boolean build(Element root, XSDCache cache, String parentName) {

    log.debug("" + indent + ": " + "Build representation of a ALL");

    id = root.getAttributeValue(XSDSchema.ID_ATT);
    maxOccurs = root.getAttributeValue(XSDSchema.MAXOCCURS_ATT);
    minOccurs = root.getAttributeValue(XSDSchema.MINOCCURS_ATT);

    group = new LinkedList<XMLType>();

    Element element;
    String elementName;

    for (Iterator<?> i = (root.getChildren()).iterator(); i.hasNext();) {

        element = (Element) i.next();
        elementName = element.getName();

        log.debug("" + indent + ": " + "Child element <" + elementName + "> found");

        /** process the child elements that define this element...   **/

        if (elementName.equals(XSDSchema.ANNOTATION)) {

            annotation = element.getTextTrim();
        } else if (elementName.equals(XSDSchema.ELEMENT)) {

            log.debug("" + indent + ": " + "Adding element to the list of child elements");

            XSDElement e = new XSDElement(indent + 1);

            if (e.build(element, cache, parentName) != true) {
                log.error("Error building an element - " + element);
                return (false);
            }

            group.add(e);
        } else {
            log.warn("" + indent + ": " + "Unexpected element <" + elementName + "> found and ignored");
        }

    } // end for all child elements of this <ALL> tag

    log.debug("" + indent + ": " + "ALL built");

    return (true);

}

From source file:com.init.octo.schema.XSDAttribute.java

License:Open Source License

/**
 * This method builds the element definition
 *
 * @param    root - the schema element that defines this element
 * @param    cache - a list of pre-defined XML types
 *//*from  w  w  w.  ja v a  2s  . c  om*/

//log.debug("Build representation of an Attribute");
public boolean build(Element root, XSDCache cache, String parentName) {
    this.parentName = parentName;
    name = root.getAttributeValue(XSDSchema.NAME_ATT);
    ref = root.getAttributeValue(XSDSchema.REF_ATT);
    type = root.getAttributeValue(XSDSchema.TYPE_ATT);
    defaultAtt = root.getAttributeValue(XSDSchema.DEFAULT_ATT);
    use = root.getAttributeValue(XSDSchema.USE_ATT);

    if (use == null) {
        use = "optional";
    }
    if (defaultAtt == null) {
        defaultAtt = "";
    }

    if (notEmpty(name)) {
        cache.putAttribute(name, this);
    }

    if (notEmpty(ref)) {
        XSDAttribute refAtt = (XSDAttribute) cache.getAttribute(ref);
        if (refAtt == null) {
            log.warn("Referenced attribute not found [" + ref + "]");
            return (true);
        }
        name = refAtt.getName();
        use = refAtt.getUse();
        defaultAtt = refAtt.getDefault();
        type = refAtt.getType();
        return (true);
    }

    for (Element child : root.getChildren()) {
        String childElementType = child.getName();

        if (childElementType.equals(XSDSchema.ANNOTATION)) {
            annotation = child.getTextTrim();
        } else if (childElementType.equals(XSDSchema.SIMPLETYPE)) {
            if (elementType != null) {
                throw new XmlSchemaException("Cannot define the type of an attribute more than once");
            }
            elementType = new XSDElementTypeSimple();
            elementType.build(child, cache, parentName);
        }
    } // end for all child elements of this <element> tag

    log.debug("Attribute built");
    return true;
}

From source file:com.init.octo.schema.XSDAttributeGroup.java

License:Open Source License

/**
 * This method builds the element definition
 *
 * @param root//  w  ww .j a va 2s .  c  o  m
 *            - the schema element that defines this element
 * @param cache
 *            - a list of pre-defined XML types
 */

public boolean build(Element root, XSDCache cache, String parentName) {

    log.debug("Build representation of an AttributeGroup");

    id = root.getAttributeValue(XSDSchema.ID_ATT);
    name = root.getAttributeValue(XSDSchema.NAME_ATT);
    ref = root.getAttributeValue(XSDSchema.REF_ATT);

    if (name != null && name.equals("") == false) {
        cache.putAttributeGroup(name, this);
    }

    if (ref != null && ref.equals("") == false) {

        XSDAttributeGroup refAttGroup = (XSDAttributeGroup) cache.getAttributeGroup(ref);

        if (refAttGroup == null) {
            log.debug("Referenced attribute group not found [" + ref + "]");
            return (true);
        }

        attributeList = refAttGroup.getAttributeList();

        return (true);
    }

    log.debug("AttributeGroup <" + name + ">");

    Element element;
    String elementName;

    attributeList = new ArrayList<XSDAttributeType>();

    for (Iterator<?> i = (root.getChildren()).iterator(); i.hasNext();) {

        element = (Element) i.next();
        elementName = element.getName();

        log.debug("Child element <" + elementName + "> found");

        /** process the child elements that define this element... **/

        if (elementName.equals(XSDSchema.ANNOTATION)) {

        } else if (elementName.equals(XSDSchema.ATTRIBUTE)) {

            XSDAttribute attribute = new XSDAttribute();
            if (attribute.build(element, cache, parentName) != true) {
                log.error("Error building an attribute object");
                return (false);
            }

            attributeList.add(attribute);

        } else if (elementName.equals(XSDSchema.ATTRIBUTEGROUP)) {

            XSDAttributeGroup group = new XSDAttributeGroup();

            if (group.build(element, cache, parentName) != true) {
                log.error("Error building a sub-attribute-group object");
                return (false);
            }

            attributeList.add(group);

        } else {
            log.warn("Unexpected element <" + elementName + "> found and ignored");
        }

    } // end for all child elements of this <element> tag

    log.debug("Attribute built");

    return (true);

}

From source file:com.init.octo.schema.XSDChoice.java

License:Open Source License

/**
 * This method builds a choice element/*from   w w  w .j a v a2s .  c o m*/
 * @param root
 *            - the choice element that defines this element
 * @param cache
 *            - a list of pre-defined XML types
 */
public boolean build(Element root, XSDCache cache, String parentName) {

    log.debug("" + indent + ": " + "Build representation of a choice");

    id = root.getAttributeValue(XSDSchema.ID_ATT);
    maxOccurs = root.getAttributeValue(XSDSchema.MAXOCCURS_ATT);
    minOccurs = root.getAttributeValue(XSDSchema.MINOCCURS_ATT);

    group = new LinkedList<XMLType>();

    String elementName;

    for (Element element : root.getChildren()) {
        elementName = element.getName();
        log.debug("" + indent + ": " + "Child element <" + elementName + "> found");

        if (elementName.equals(XSDSchema.ANNOTATION)) {
            annotation = element.getTextTrim();
        } else if (elementName.equals(XSDSchema.ELEMENT)) {
            log.debug("" + indent + ": " + "Adding element to the list of child elements");
            XSDElement e = new XSDElement(indent + 1);
            if (e.build(element, cache, parentName) != true) {
                log.error("Error building the element");
                return (false);
            }

            group.add(e);
        } else if (elementName.equals(XSDSchema.GROUP)) {

            log.debug("" + indent + ": " + "Adding group to the list of child elements");
            XSDGroupType g = new XSDElementGroup(indent);
            if (g.build(element, cache, parentName) != true) {
                log.error("Error building a group");
                return (false);
            }

            group.add(g);

        } else if (elementName.equals(XSDSchema.CHOICE)) {

            log.debug("" + indent + ": " + "Adding choice to the list of child elements");

            XSDChoice c = new XSDChoice(indent);
            if (c.build(element, cache, parentName) != true) {
                log.error("Error building a choice");
                return (false);
            }

            group.add(c);
        } else if (elementName.equals(XSDSchema.SEQUENCE)) {

            log.debug("" + indent + ": " + "Adding sequence to the list of child elements");
            XSDSequence s = new XSDSequence(indent); // child elements all at the same level

            if (s.build(element, cache, parentName) != true) {
                log.debug("Error building a sequence");
                return (false);
            }

            group.add(s);
        } else {
            log.warn("" + indent + ": " + "Unexpected element <" + elementName + "> found and ignored");
        }

    } // end for all child elements of this <choice> tag

    log.debug("" + indent + ": " + "Choice built");

    return (true);

}

From source file:com.init.octo.schema.XSDElement.java

License:Open Source License

/**
 * This method builds the element definition
 *
 * @param    root - the schema element that defines this element
 * @param    cache - a list of pre-defined XML types
 */// ww w  .  j a  v a  2 s . com

public boolean build(Element root, XSDCache cache, String parentName) {

    log.debug("" + indent + ": " + "Build representation of an Element");

    // root.getAttributeValue(XSDSchema.ID_ATT);
    //root.getAttributeValue(XSDSchema.BLOCK_ATT);
    //root.getAttributeValue(XSDSchema.FINAL_ATT);

    name = root.getAttributeValue(XSDSchema.NAME_ATT);
    ref = root.getAttributeValue(XSDSchema.REF_ATT);
    type = root.getAttributeValue(XSDSchema.TYPE_ATT);
    maxOccurs = root.getAttributeValue(XSDSchema.MAXOCCURS_ATT);
    minOccurs = root.getAttributeValue(XSDSchema.MINOCCURS_ATT);

    this.parentName = parentName;

    log.debug("" + indent + ": Element <" + name + ">");

    /** Add the element definition to the element cache... **/

    if (name != null && name.equals("") == false) {
        log.debug("Adding element [" + name + "] to the cache");
        cache.putElement(name, this);
    }

    /** If this element is a reference to another full definition then get that definition... **/

    if (ref != null && ref.equals("") == false) {

        name = ref;

        XSDElement refElement = (XSDElement) cache.getElement(ref);

        if (refElement == null) {
            log.debug("The reference element [" + ref + "] not in the cache...");
            return (true);
        }

        log.debug("The reference element [" + ref + "] retrieved from the cache...");

        /* Referenced element found so make this element look like it... */

        elementType = refElement.getElementType();

        if (maxOccurs == null) {
            maxOccurs = refElement.getMaxOccurs();
        }

        if (minOccurs == null) {
            minOccurs = refElement.getMinOccurs();
        }

        if (name == null) {
            name = refElement.getName();
        }

        defaultOccurs();

        return (true);

    }

    defaultOccurs();

    /** if the type attribute has been specified then lookup its definition in the cache **/

    if (type != null) {

        log.debug("" + indent + ": This element is of type <" + type + ">");

        elementType = (XSDElementType) cache.getElementTypeComplex(type);

        if (elementType == null) {
            log.debug("No definition of type <" + type + "> found in type cache");
            /** carry on, the type was probably an XSD standard type... **/
        } else {
            cachedType = true;
            /** no sub definition allowed if the type has been specified **/
            return (true);
        }
    }

    Element element;
    String elementName;

    for (Iterator<Element> i = (root.getChildren()).iterator(); i.hasNext();) {

        element = (Element) i.next();
        elementName = element.getName();

        log.debug("" + indent + ": " + "Child element <" + elementName + "> found");

        /** process the child elements that define this element...   **/

        if (elementName.equals(XSDSchema.ANNOTATION)) {

            annotation = element.getTextTrim();

        } else if (elementName.equals(XSDSchema.SIMPLETYPE)) {

            if (elementType != null) {
                log.error("Cannot define the type of an element more than once");
                return (false);
            }

            elementType = new XSDElementTypeSimple(indent);

            if (elementType.build(element, cache, getFullName()) == false) {
                log.error("Error building a simpleType object");
                return (false);
            }
        } else if (elementName.equals(XSDSchema.COMPLEXTYPE)) {

            if (elementType != null) {
                log.error("Cannot define the type of an element more than once");
                return (false);
            }

            elementType = new XSDElementTypeComplex(indent);

            if (elementType.build(element, cache, getFullName()) == false) {
                log.error("Error building a complexType object");
                return (false);
            }
        } else {
            log.warn("" + indent + ": " + "Unexpected element <" + elementName + "> found and ignored");
        }

    } // end for all child elements of this <element> tag

    log.debug("" + indent + ": " + "Element built");

    return (true);

}

From source file:com.init.octo.schema.XSDElementTypeComplex.java

License:Open Source License

/**
 * This method builds a complex type/*from  ww  w .  ja v  a 2  s .co m*/
 *
 * @param    root - the complexType element that defines this element
 * @param    cache - a list of pre-defined XML types
 */

public boolean build(Element root, XSDCache cache, String parentName) {

    log.debug("" + indent + ": " + "Build representation of a ComplexType");

    /** get the complex types attributes **/

    id = root.getAttributeValue(XSDSchema.ID_ATT);
    name = root.getAttributeValue(XSDSchema.NAME_ATT);
    abstractAtt = root.getAttributeValue(XSDSchema.ABSTRACT_ATT);
    mixed = root.getAttributeValue(XSDSchema.MIXED_ATT);
    block = root.getAttributeValue(XSDSchema.BLOCK_ATT);
    finalAtt = root.getAttributeValue(XSDSchema.FINAL_ATT);

    log.debug("" + indent + ": ComplexType <" + name + ">");

    for (Element rootChild : root.getChildren()) {
        String elementName = rootChild.getName();

        if (elementName.equals(XSDSchema.ANNOTATION)) {
            annotation = rootChild.getTextTrim();

        } else if (elementName.equals(XSDSchema.SIMPLECONTENT)) {

        } else if (elementName.equals(XSDSchema.COMPLEXCONTENT)) {

            for (Element child : rootChild.getChildren()) {

                Attribute baseTypeAtt = child.getAttribute(XSDSchema.BASE_ATT);
                if (baseTypeAtt == null) {
                    throw new XmlSchemaException("No base attribute for element [" + elementName + "]");
                }

                XSDElementTypeComplex cachedObject = cache.getElementTypeComplex(baseTypeAtt.getValue());
                if (cachedObject != null) {
                    baseType = cachedObject;
                }

                processComplexTypeChildren(child, cache);
            }

        } else if (elementName.equals(XSDSchema.GROUP)) {
            if (elementGroup != null) {
                throw new XmlSchemaException("Cannot define a grouping element more than once");
            }
            elementGroup = new XSDElementGroup(indent);
            elementGroup.build(rootChild, cache, parentName);

        } else if (elementName.equals(XSDSchema.ALL)) {
            if (elementGroup != null) {
                throw new XmlSchemaException("Cannot define a grouping element more than once");
            }
            elementGroup = new XsdAll(indent);
            elementGroup.build(rootChild, cache, parentName);
        } else if (elementName.equals(XSDSchema.CHOICE)) {
            if (elementGroup != null) {
                throw new XmlSchemaException("Cannot define a grouping element more than once");
            }

            elementGroup = new XSDChoice(indent);
            elementGroup.build(rootChild, cache, parentName);
        } else if (elementName.equals(XSDSchema.SEQUENCE)) {

            if (elementGroup != null) {
                log.error("Cannot define a grouping element more than once");
                return (false);
            }

            elementGroup = new XSDSequence(indent);

            if (elementGroup.build(rootChild, cache, parentName) != true) {
                log.error("Error building a sequence object");
                return (false);
            }
        } else if (elementName.equals(XSDSchema.ATTRIBUTE)) {

            XSDAttribute attribute = new XSDAttribute();
            if (attribute.build(rootChild, cache, parentName) != true) {
                log.error("Error building an attribute object");
                return (false);
            }

            attributeList.add(attribute);
        } else if (elementName.equals(XSDSchema.ATTRIBUTEGROUP)) {

            XSDAttributeGroup group = new XSDAttributeGroup();

            if (group.build(rootChild, cache, parentName) != true) {
                log.error("Error building an attribute group object");
                return (false);
            }

            attributeList.addAll(group.getAllAttributes());

        } else {
            log.warn("" + indent + ": " + "Unexpected element <" + elementName + "> found and ignored");
        }

    } // end for all child elements of this <element> tag

    log.debug("" + indent + ": " + "ComplexType built");

    return (true);

}

From source file:com.init.octo.schema.XSDElementTypeSimple.java

License:Open Source License

/**
 * This method builds a simple type//from ww w  . j a v a2  s  .co m
 *
 * @param root
 *            - the simpleType element that defines this element
 * @param cache
 *            - a list of pre-defined XML types
 */

public boolean build(Element root, XSDCache cache, String parentName) {

    log.debug("" + indent + ": " + "Build representation of a SimpleType");

    id = root.getAttributeValue(XSDSchema.ID_ATT);
    finalAtt = root.getAttributeValue(XSDSchema.FINAL_ATT);
    name = root.getAttributeValue(XSDSchema.NAME_ATT);

    for (Element child : root.getChildren()) {
        String childType = child.getName();

        if (childType.equals(XSDSchema.ANNOTATION)) {
            annotation = child.getTextTrim();
            break;
        } else if (childType.equals(XSDSchema.RESTRICTION)) {
            // @todo
        } else if (childType.equals(XSDSchema.LIST)) {
            // @todo
        }
    }

    return true;
}

From source file:com.init.octo.schema.XSDGroupType.java

License:Open Source License

public boolean build(Element root, XSDCache cache, String parentName) {

    log.debug("" + indent + ": " + "Build representation of a group");

    id = root.getAttributeValue(XSDSchema.ID_ATT);
    maxOccurs = root.getAttributeValue(XSDSchema.MAXOCCURS_ATT);
    minOccurs = root.getAttributeValue(XSDSchema.MINOCCURS_ATT);
    name = root.getAttributeValue(XSDSchema.NAME_ATT);
    ref = root.getAttributeValue(XSDSchema.REF_ATT);

    /* If this group is named then add it to the cache... */
    /*/*  w  w  w .j  a  va  2  s . c o m*/
          if (name != null && name.equals("") == false) {
             cache.putGroup(name, this);
          }
    */
    /* If this group is a reference then lookup the reference... */
    /*
          if (ref != null && ref.equals("") == false) {
            
             List<XSDGroup> cachedGroup = cache.getGroup(ref);
            
             if (cachedGroup != null) {
    group
    return (true);
             }
          }
    */
    group = new LinkedList<XMLType>();

    Element element;
    String elementName;

    for (Iterator<?> i = (root.getChildren()).iterator(); i.hasNext();) {

        element = (Element) i.next();
        elementName = element.getName();

        log.debug("" + indent + ": " + "Child element <" + elementName + "> found");

        /** process the child elements that define this element... **/

        if (elementName.equals(XSDSchema.ANNOTATION)) {

            annotation = element.getTextTrim();

        } else if (elementName.equals(XSDSchema.ALL)) {

            log.debug("" + indent + ": " + "Adding ALL to the list of child elements");

            XsdAll a = new XsdAll(indent); // child elements will be at the same level

            if (a.build(element, cache, parentName) != true) {
                log.error("Error building a ALL element");
                return (false);
            }

            group.add(a);
        } else if (elementName.equals(XSDSchema.CHOICE)) {

            log.debug("" + indent + ": " + "Adding choice to the list of child elements");

            XSDChoice c = new XSDChoice(indent); // child elements will be
            // at the same level

            if (c.build(element, cache, parentName) != true) {
                log.error("Error building a choice");
                return (false);
            }

            group.add(c);
        } else if (elementName.equals(XSDSchema.SEQUENCE)) {
            log.debug("" + indent + ": " + "Adding sequence to the list of child elements");
            XSDSequence s = new XSDSequence(indent);
            if (s.build(element, cache, parentName) != true) {
                log.error("Error building a sequence");
                return (false);
            }
            group.add(s);
        } else {
            log.warn("" + indent + ": " + "Unexpected element <" + elementName + "> found and ignored");
        }

    } // end for all child elements of this <group> tag

    return (true);

}