diff --git a/zh-cn/application-dev/reference/apis-arkts/js-apis-xml.md b/zh-cn/application-dev/reference/apis-arkts/js-apis-xml.md index 42e6d4df9ab55e668e87e0f3a4e0f7f01f7f34b6..18fc2496bc3b0d8dd9c17a5ea53b87eeec55049a 100644 --- a/zh-cn/application-dev/reference/apis-arkts/js-apis-xml.md +++ b/zh-cn/application-dev/reference/apis-arkts/js-apis-xml.md @@ -1122,7 +1122,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value:1 key:2 value:45 key:4 value:50 key:3 value:57 key:1 value:57 ``` @@ -1166,7 +1166,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value:0 key:2 value:1 key:2 value:2 key:4 value:2 key:3 value:2 key:3 value:1 key:1 value:0 ``` @@ -1202,7 +1202,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value:1 key:2 value:1 key:4 value:1 key:3 value:1 key:1 value:1 ``` @@ -1238,7 +1238,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value: key:2 value:note key:4 value: key:3 value:note key:1 value: ``` @@ -1277,7 +1277,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:false, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value: key:2 value: key:2 value:http://www.w3.org key:4 value: key:3 value:http://www.w3.org key:3 value: key:1 value: ``` @@ -1316,7 +1316,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:false, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value: key:2 value: key:2 value:h key:4 value: key:3 value:h key:3 value: key:1 value: ``` @@ -1352,7 +1352,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value: key:2 value: key:4 value:Happy key:3 value: key:1 value: ``` @@ -1391,7 +1391,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value:false key:2 value:false key:2 value:true key:3 value:false key:3 value:false key:1 value:false ``` @@ -1430,7 +1430,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value:true key:2 value:false key:2 value:true key:10 value:true key:3 value:true key:3 value:true key:1 value:true ``` @@ -1464,7 +1464,7 @@ function func(key: xml.EventType, value: xml.ParseInfo) { return true; // Determines whether to continually parse, which is used to continue or terminate parsing. } let options: xml.ParseOptions = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func} -that.parse(options); +that.parseXml(options); console.info(str); // key:0 value:0 key:2 value:2 key:3 value:2 key:1 value:0 ```