企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 第十四课 xml操作 > 解析xml文件,后两个参数解析CDATA使用 ``` <pre class="calibre14">``` $xml <span class="token">=</span> <span class="token1">simplexml_load_file</span><span class="token2">(</span><span class="token4">'xml.xml'</span><span class="token2">,</span><span class="token4">"SimpleXMLElement"</span><span class="token2">,</span>LIBXML_NOCDATA<span class="token2">)</span><span class="token2">;</span> $xml<span class="token">=</span><span class="token1">simplexml_load_string</span><span class="token2">(</span>$note<span class="token2">)</span><span class="token2">;</span>解析字符串同上 ``` ``` attributes() 获取属性