Php 在两个标记之间的XML中嵌入特殊标记
我在XML中嵌入了很多错误的HTML标记。 像这样:Php 在两个标记之间的XML中嵌入特殊标记,php,html,xml,Php,Html,Xml,我在XML中嵌入了很多错误的HTML标记。 像这样: <?xml version="1.0" encoding="UTF-8"?> <main> <note> <category>computers</category> <id>1</id> <price>47072.00</price> &l
<?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 <br />
</description>
</note>
</main>
<description>
<![CDATA[<html
...HTML CODE IS HERE
]]>
</description>
计算机
1.
47072
保修-24
产品型号代码-N150
加上
我需要在标记之间插入以下代码..使用PHP读取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 <br />
</description>
</note>
</main>
<description>
<![CDATA[<html
...HTML CODE IS HERE
]]>
</description>
使用file\u get\u contents()
以数组形式打开xml文件。使用Ctrl+K
、010101按钮或缩进4个空格的代码(包括HTML)。您是否有关于使用哪种工具的问题?XSLT无法工作,因为输入的XML格式不正确。