parse(xmlData){
        if(Array.isArray(xmlData) && xmlData.byteLength !== undefined){
            return this.parse(xmlData);
        }else if( xmlData.toString){
            xmlData = xmlData.toString();
        }else{
            throw new Error("XML data is accepted in String or Bytes[] form.")
        }
        // if( validationOption){
        //     if(validationOption === true) validationOption = {}; //validate with default options
            
        //     const result = validator.validate(xmlData, validationOption);
        //     if (result !== true) {
        //       throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` )
        //     }
        //   }
        const parser = new Xml2JsParser(this.options);
        parser.entityParser.addExternalEntities(this.externalEntities);
        return parser.parse(xmlData);
    }
Parse XML data string to JS object 
@param {string|Buffer} xmlData 
@param {boolean|Object} validationOption