private static Node getChildNodeByType(Element element, short nodeType)
    {
        if (element == null)
        {
            return null;
        }

        NodeList nodes = element.getChildNodes();
        if (nodes == null || nodes.getLength() < 1)
        {
            return null;
        }

        Node node;
        String data;
        for (int i = 0; i < nodes.getLength(); i++)
        {
            node = nodes.item(i);
            short type = node.getNodeType();
            if (type == nodeType)
            {
                if (type == Node.TEXT_NODE || type == Node.CDATA_SECTION_NODE)
                {
                    data = ((Text) node).getData();
                    if (data == null || data.trim().length() < 1)
                    {
                        continue;
                    }
                }

                return node;
            }
        }

        return null;
    }