XML文件内容读取

WBOY
Lepaskan: 2016-06-20 12:36:39
asal
926 orang telah melayarinya

<?xml version="1.0" encoding="utf-8" standalone="yes"?><Identification>  <tag>    <resultreports code="" />    <kanban startdate="2016/01/29 08:46:48" date="2016/01/29" shiftindex="1" kanbanindex="1" snp="16" plannum="512" finalcountsnp="16" finalcountplannum="192" kanbandata="B02   GE500746            C  00000000   16                                                                                                 *" />    <works>      <workid>15GE500746 C D16013100130</workid>      <workid>15GE500746 C D16013100115</workid>      <workid>15GE500746 C D16013100117</workid>      <workid>15GE500746 C D16013100120</workid>      <workid>15GE500746 C D16013100133</workid>      <workid>15GE500746 C D16013100122</workid>      <workid>15GE500746 C D16013100135</workid>      <workid>15GE500746 C D16013100041</workid>      <workid>15GE500746 C D16013100045</workid>      <workid>15GE500746 C D16020100003</workid>      <workid>15GE500746 C D16020100005</workid>      <workid>15GE500746 C D16020100001</workid>      <workid>15GE500746 C D16020100004</workid>      <workid>15GE500746 C D16020100006</workid>      <workid>15GE500746 C D16020100011</workid>      <workid>15GE500746 C D16020100008</workid>    </works>    <forcingprint>False</forcingprint>    <qrcode>B120010218160201GE500746            C  00000000      16                                 16201A7      16131A9                                       001 20160201140015          2                                </qrcode>    <issuekind />    <parentissueno />    <lots>      <lot lotno="16131A">        <workid>15GE500746 C D16013100130</workid>        <workid>15GE500746 C D16013100115</workid>        <workid>15GE500746 C D16013100117</workid>        <workid>15GE500746 C D16013100120</workid>        <workid>15GE500746 C D16013100133</workid>        <workid>15GE500746 C D16013100122</workid>        <workid>15GE500746 C D16013100135</workid>        <workid>15GE500746 C D16013100041</workid>        <workid>15GE500746 C D16013100045</workid>      </lot>      <lot lotno="16201A">        <workid>15GE500746 C D16020100003</workid>        <workid>15GE500746 C D16020100005</workid>        <workid>15GE500746 C D16020100001</workid>        <workid>15GE500746 C D16020100004</workid>        <workid>15GE500746 C D16020100006</workid>        <workid>15GE500746 C D16020100011</workid>        <workid>15GE500746 C D16020100008</workid>      </lot>    </lots>  </tag></Identification>
Salin selepas log masuk


要读取lots里面那段的内容,得到如下结果:
1613A
15GE500746 C D16013100130
...(中间省略)
15GE500746 C D16013100045

16201A
15GE500746 C D16020100003
...(中间省略)
15GE500746 C D16020100008


回复讨论(解决方案)

可以加一个XML解析的插件

自己解决了。

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan