!14557 Add ConvertXml fastConvertToJSObject method

Merge pull request !14557 from yaoyuan/fastConvertToJSObject
This commit is contained in:
openharmony_ci 2024-11-26 11:15:29 +00:00 committed by Gitee
commit fb2ad2ac88
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -625,6 +625,23 @@ declare namespace xml {
* @since 11
*/
convertToJSObject(xml: string, options?: ConvertOptions): Object;
/**
* To convert XML text to JavaScript object with better performance.
*
* @param { string } xml - xml xml The xml text to be converted.
* @param { ConvertOptions } [options] - options option Option Inputted by user to set.
* @returns { Object } Returns a JavaScript object converting from XML text.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @throws { BusinessError } 10200002 - Invalid xml string.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 14
*/
fastConvertToJSObject(xml: string, options?: ConvertOptions): Object;
}
}
export default xml;