2010-12-22 115 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文件作为数组。