下面是我的xml文檔,現在我的查詢是:/description/*/text()
,我可以得到除<strong> lunch </strong>
「午餐」不顯示的文字外的所有文字。xpath查詢問題
這可能是一個簡單的修復,但我只是無法弄清楚它的正確性。
<description>
<![CDATA[
<p>
Envie is a brand new Bar Lounge that offers a modern-design space opening onto Wyndham Street, where on busy nights the crowd spills out onto the street...
</p>
<p>
If you are in for a <strong>lunch</strong>, the Twangoo voucher will offer you two delicious Lunches – perfect for that lunch meeting, a casual date or just a get together with friends in a relaxed and modern atmosphere.
</p> ]]>
</description>
你的XML包含'CDATA'?你需要在'CDATA'裏解析XML嗎? –