關於xml解析

來源:互聯網
上載者:User
xml格式如下:

0擷取內容成功1407549867875安裝包下載2013-09-06 12:39:31 <br /> <STYLE> <br /> /* Generator: eWebEditor */ <br /> p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;font-size:10.5pt;font-family:"Calibri","sans-serif";} <br /> .MsoChpDefault {font-size:10.0pt;font-family:"Calibri","sans-serif";} <br /> div.WordSection1 {page:WordSection1;} <br /> </STYLE> <br /> <br /> <P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; FONT-SIZE: 12pt">適用於“數位憑證”或“CI認證”使用者</SPAN><SPAN style="FONT-SIZE: 12pt"> <SPAN><SPAN> </SPAN><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"></SPAN></SPAN></SPAN></P> <br /> <P class=MsoNormal><SPAN style="FONT-SIZE: 12pt"><SPAN></SPAN></SPAN> </P> <br /> <P class=MsoNormal><SPAN style="FONT-SIZE: 12pt"><SPAN> </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋體; FONT-SIZE: 12pt">說明:XXXXX??</SPAN><SPAN style="FONT-SIZE: 12pt">CA</SPAN><SPAN style="FONT-FAMILY: 宋體; FONT-SIZE: 12pt">智能終端。</SPAN><SPAN style="FONT-SIZE: 12pt"><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"></SPAN></SPAN></P><br>

說明,一般的xml格式我用simplexml_load_string(xml)都可以解析出來。。。
可是當xml資料裡面有遇到...時,這個元素裡的資料就會解析不出來,是空的。 <br /> 哪位大哥知道如何解板xml得到<![CDATA[裡的資料麼??? <p> </p> </p> <br /> <h2>回複討論(解決方案)</h2> <p class="sougouAnswer"> simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA) </p> <p class="sougouAnswer"> 第三???用 LIBXML_NOCDATA <br /> ?考: http://php.net/manual/en/libxml.constants.php </p> <p class="sougouAnswer"> 謝謝樓上兩位!<li ><i class="layui-icon">&#xe63a;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.