1

我正在尝试阅读以下 XML 文档,我在阅读EXT_STRING0>&lt此标签时遇到问题,在此先感谢

<Results>
<ResultSet fetchSize="0">
    <Row rowNumber="1">
        <OBJECT_ID>AOM_Reference_User5L76V75WA%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RNUR7OQ9VV5R61F3S2K66AHBV&lt;/tokenString&gt;&lt;createdAt&gt;04-03-2013T12:48:55&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="2">
        <OBJECT_ID>AOM_Reference_UserLKKEV81D1%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RIF9XTJSTYCPUMHCQ11FCI1HC&lt;/tokenString&gt;&lt;createdAt&gt;28-02-2013T15:57:06&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="3">
        <OBJECT_ID>AOM_Reference_User4NO17EFO3%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RIF9V5WRWELSYMHCQ11FCI1HC&lt;/tokenString&gt;&lt;createdAt&gt;28-02-2013T14:43:55&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="4">
        <OBJECT_ID>AOM_Reference_User5K4S9NA1S%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RIF9YBD1VK6OYMHCQ11FCI1HC&lt;/tokenString&gt;&lt;createdAt&gt;28-02-2013T15:59:05&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="5">
        <OBJECT_ID>AOM_Reference_UserZUMIPYUR6%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RIF9XOM81TEXUMHCQ11FCI1HC&lt;/tokenString&gt;&lt;createdAt&gt;28-02-2013T15:55:29&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="6">
        <OBJECT_ID>AOM_Reference_UserT3SURUV71%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RNUR7I9G8KOO21F3S2K66AHBV&lt;/tokenString&gt;&lt;createdAt&gt;04-03-2013T12:47:33&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="7">
        <OBJECT_ID>AOM_Reference_UserJ8LKYCDT6%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RIF9YBB2UG4PUMHCQ11FCI1HC&lt;/tokenString&gt;&lt;createdAt&gt;28-02-2013T15:59:04&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="8">
        <OBJECT_ID>AOM_Reference_UserO9PJ92I6X%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RIF9XP9WF62N6MHCQ11FCI1HC&lt;/tokenString&gt;&lt;createdAt&gt;28-02-2013T15:55:35&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="9">
        <OBJECT_ID>AOM_Reference_UserKK62LWXVU%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RIF9WAUNZJLCYMHCQ11FCI1HC&lt;/tokenString&gt;&lt;createdAt&gt;28-02-2013T14:51:45&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
    <Row rowNumber="10">
        <OBJECT_ID>AOM_Reference_User8JLCJG90R%40aom.com</OBJECT_ID>
        <EXT_STRING0>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;Token&gt;&lt;Device&gt;&lt;deviceId&gt;jfhksjdhfjks231231233&lt;/deviceId&gt;&lt;tokenString&gt;RIF9Y48JUX1WIMHCQ11FCI1HC&lt;/tokenString&gt;&lt;createdAt&gt;28-02-2013T15:58:41&lt;/createdAt&gt;&lt;/Device&gt;&lt;/Token&gt;</EXT_STRING0>
    </Row>
</ResultSet>

4

2 回答 2

1

您可以使用 CDATA 块和/或继续将 xml 写入“常规”xml 节点,并在读取文件时添加 xml 声明。

您还可以指定<?xml version="1.0" encoding="utf-8"?>声明。

于 2013-03-05T13:32:36.607 回答
0

问题解决了我解码格式并解析

于 2013-06-10T06:29:11.520 回答