diff --git a/en/application-dev/reference/apis/js-apis-convertxml.md b/en/application-dev/reference/apis/js-apis-convertxml.md index e4ffcaa90d6a9ed2c45eff9756ff2e45ae30a2a8..f403580810cb946d98aed4ff2f9808323656e89e 100644 --- a/en/application-dev/reference/apis/js-apis-convertxml.md +++ b/en/application-dev/reference/apis/js-apis-convertxml.md @@ -40,13 +40,14 @@ Converts an XML text into a JavaScript object. - Example ``` - var xml = + let xml = '' + '' + ' Happy' + ' Work' + ' Play' + ''; + let conv = new convertxml.ConvertXML(); let options = {trim : false, declarationKey:"_declaration", instructionKey : "_instruction", attributesKey : "_attributes", textKey : "_text", cdataKey:"_cdata", doctypeKey : "_doctype", diff --git a/zh-cn/application-dev/reference/apis/js-apis-convertxml.md b/zh-cn/application-dev/reference/apis/js-apis-convertxml.md index 977edb72913320b86962e29b6fbc492398910cca..0e4e1a1c71610ceaca065c396e2f70fc0a7a74fe 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-convertxml.md +++ b/zh-cn/application-dev/reference/apis/js-apis-convertxml.md @@ -40,13 +40,14 @@ convert(xml: string, options?: ConvertOptions) : Object - 示例: ``` - var xml = + let xml = '' + '' + ' Happy' + ' Work' + ' Play' + ''; + let conv = new convertxml.ConvertXML(); let options = {trim : false, declarationKey:"_declaration", instructionKey : "_instruction", attributesKey : "_attributes", textKey : "_text", cdataKey:"_cdata", doctypeKey : "_doctype",