public static String[] getChildrenProperties(Element element, String parent) {
        String[] propName = parsePropertyName(parent);

        // Search for this property by traversing down the XML hierarchy.
        int i = propName[0].equals(element.getName()) ? 1 : 0;
        for (; i < propName.length; i++) {
            element = element.element(propName[i]);
            if (element == null) {
                // This node doesn't match this part of the property name which
                // indicates this property doesn't exist so return empty array.
                return new String[]{};
            }
        }
        // We found matching property, return names of children.
        List children = element.elements();
        int childCount = children.size();
        String[] childrenNames = new String[childCount];
        for (int j = 0; i < childCount; i++) {
            childrenNames[j] = ((Element) children.get(j)).getName();
        }
        return childrenNames;
    }
Return all children property names of a parent property as a String array,
or an empty array if the if there are no children. You MAY NOT use the attribute
markup (using a ':' in the last element name) with this call.
For example, given the properties {@code X.Y.A}, {@code X.Y.B}, and {@code X.Y.C}, then
the child properties of {@code X.Y} are {@code A}, {@code B}, and
{@code C}.

@param element the element to get the properties from
@param parent the name of the parent property.
@return all child property values for the given parent.
xmppserver/src/main/java/org/jivesoftware/util/ElementUtil.java