function xmlContainsElem(parent, requiredElem, options) {
    // Non-top level xml is parsed into object in the following manner.

    // Example: <Parent><requiredElem>value</requiredElem>
    //          <anotherElem>value2</anotherElem></Parent>
    // Result: { Parent: [{ requiredElem: ["value"],
    //            anotherElem: ["value2"] }] }

    // Example for xml list:
    //  <ParentList>
    //      <requiredElem>value</requiredElem>
    //      <requiredElem>value</requiredElem>
    //      <requiredElem>value</requiredElem>
    //  </ParentList>
    // Result: { ParentList: [{ requiredElem: ['value', 'value', 'value'] }] }

    const isList = options ? options.isList : false;
    const checkForAll = options ? options.checkForAll : false;
    // true by default, validateParent only designated as false when
    // parent was validated in previous check
    const validateParent = (options && options.validateParent !== undefined) ?
        options.validateParent : true;

    if (validateParent && !_isValidElem(parent)) {
        return false;
    }
    if (Array.isArray(requiredElem)) {
        if (checkForAll) {
            return requiredElem.every(elem => _isValidElem(parent[0][elem]));
        }
        return requiredElem.some(elem => _isValidElem(parent[0][elem]));
    }
    if (isList) {
        if (!Array.isArray(parent[0][requiredElem]) ||
        parent[0][requiredElem].length === 0) {
            return false;
        }
    } else {
        return _isValidElem(parent[0][requiredElem]);
    }

    return true;
}
Check if parsed xml element contains a specified child element
@param {array} parent - represents xml element to check for child element
@param {(string|string[])} requiredElem - name of child element(s)
@param {object} [options] - specify additional options
@param {boolean} [isList] - indicates if parent is list of children elements,
used only in conjunction a singular requiredElem argument
@param {boolean} [checkForAll] - return true only if parent element contains
all children elements specified in requiredElem; by default, returns true if
parent element contains at least one
@param {boolean} [validateParent] - validate format of parent element
@return {boolean} true / false - if parsed xml element contains child