如何使用 progress 4gl dom 读取包含多个元素的 xml 文件并写入 temp-table?

how to read xml file with multiple elements and write to temp-table using progress 4gl dom?

请帮助我阅读此 xml 文件并使用 progress 4gl

写入 temp-table

我的 xml 文件如下所示。

 <?xml version="1.0" encoding="UTF-8"?>

        <bookstore>
          <bookone>
            <title>Everyday Italian</title>
            <author>Giada De Laurentiis</author>
            <year>2005</year>
            <price>30.00</price>
          </bookone>

          <cars>
            <model>
            <plate>12345</plate>
            <purchase>04/03/2011</purchase>
            <insurence>yes</insurence>
            </model>

          <model>
          <plate>56789</plate>
          <purchase>04/03/2011</purchase>
          <insurence>no</insurence>
          </model>

        </cars>

        <booktwo>
            <title>XQuery Kick Start</title>
            <author>James McGovern</author>
            <author>Per Bothner</author>
            <author>Kurt Cagle</author>
            <author>James Linn</author>
            <author>Vaidyanathan Nagarajan</author>
            <year>2003</year>
            <date>02/05/2009</date>
          </booktwo>


        </bookstore>

我已经尝试过带有 repeat 语句的代码,但没有用。

Progress 4gl 带有用于 XML 的内置解析器。有萨克斯和 Dom。 Sax 解析器在现实中对您更有用,在文档中有一个关于如何使用它的很好的起点,这里:https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dvxml/example-code-3a-reading-customer-data-and-writing.html