> For the complete documentation index, see [llms.txt](https://doc.duaer.com/zh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/build/xml.md).

# 在 Duaer 里用 XML 节点转换格式

在 Duaer 里，XML 默认 Mode 是 XML to JSON。Property Name 默认是 data。binary 里的 XML 先用 Extract from File 转成文本。
## 把 XML 转成 JSON

1. 上游条目的某个字段里要有 XML 字符串，字段名例如 data。
2. 搜索 XML，接到那个节点后面。
3. Mode 保持 XML to JSON。
4. Property Name 默认是 data，改成实际字段名。
5. 点执行此步骤。输出是解析后的 JSON。

Mode 还可选 JSON to XML，把 JSON 写成 XML；Options 里 Root Name 默认是 root。

文件在 binary 上时，先见 [在 Duaer 里用 Extract from File 读出文件](/zh/build/extract-from-file.md)。
## Questions

### Duaer 的 XML 节点能直接读 .xml 文件路径吗？

不能。它读的是条目字段里的文本。文件在 binary 时先 Extract from File；本机磁盘用自托管的 Read/Write Files from Disk。

