0

我有以下 XML 文件:

<refObjects xsi:type="xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id>123</id>
<tagfoo>Name 1</tagfoo>
</refObjects>
<refObjects xsi:type="xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id>456</id>
    <tagfoo>Name 2</tagfoo>
</refObjects>
<refObjects xsi:type="xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id>789</id>
    <tagfoo>Name 3</tagfoo>
</refObjects>

我想从“id”和“tagfoo”中获取值。在我的事件类型 START_TAG 中,我可以读取标签名称、类型、值等,但无法获取文本。在我的事件类型 TEXT 中,我无法读取此标签信息。我将如何获得这些值?

4

0 回答 0