• Home
Name Date Size #Lines LOC

..--

entry/12-May-2024-850762

screenshots/device/12-May-2024-

.gitignoreD12-May-2024121 88

README.mdD12-May-2024705 189

README_zh.mdD12-May-2024850 2915

build-profile.json5D12-May-20241 KiB4341

hvigorfile.jsD12-May-2024174 21

package.jsonD12-May-2024380 1818

README.md

1# XML Text Conversion
2
3### Introduction
4
5This sample shows how to use **XmlSerializer**, **XmlPullParser**, and **ConvertXML** to generate an XML text, parse the XML text, and convert the XML text into a JavaScript object, respectively.
6
7### Usage
8
91. Touch **Xml Serializer** to generate an XML text and display the text content in the text box above the button.
10
112. Touch **Xml Pull Parser** to parse the preset XML text and display the parsed information in the text box above the button.
12
133. Touch **XML Convert** to convert the preset XML text into a JavaScript object and display the object in the text box above the button.
14
15### Constraints
16
17This sample can only be run on standard-system devices.
18

README_zh.md

1# xml文本转换
2
3### 简介
4
5本示例通过XmlSerializer生成xml文本,通过XmlPullParser解析xml文本,通过ConvertXML将xml文本转换为JavaScript对象。实现效果如下:
6
7![](screenshots/device/main.png)
8
9### 相关概念
10
11xml解析与生成、xml转换JavaScript。
12
13### 相关权限
14
15不涉及。
16
17### 使用说明
18
191.点击**Xml 生成**按钮,会构建xml文本,并在按钮上方的文本框显示xml文本内容。
20
212.点击**Xml 解析**按钮,会解析已经预置的xml文本,并在文本框显示解析信息。
22
233.点击**Xml 转换**按钮,会将预置的xml文本转换为JavaScript对象,并在文本框显示。
24
25### 约束与限制
26
271.本示例仅支持在标准系统上运行。
28
292.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。