2010-12-22 91 views
0

我在XML內嵌入了很多錯誤的HTML標籤。 這樣的:在兩個標籤之間嵌入XML中的特殊標籤

<?xml version="1.0" encoding="UTF-8"?> 
<main>  
    <note> 
     <category>computers</category> 
     <id>1</id> 
      <price>47072.00</price> 
     <description> 
       <p>Warranty - 24<br />Product model code - N150 
       Plus&nbsp;<br />    
      </description>  
    </note> 
</main> 

我需要這個標籤之間插入code..to讀取使用PHP XML文件。

這樣的:

<description> 
     <![CDATA[<html 
     ...HTML CODE IS HERE 

     ]]> 
</description> 
+0

使用「Ctrl + K」,010101按鈕或縮進4位代碼(包括HTML)。 – Oded 2010-12-22 10:20:03

回答

1

使用file_get_contents()爲Open XML文件作爲數組。