Rumah  >  Artikel  >  pembangunan bahagian belakang  >  修改xml文件值的有关问题

修改xml文件值的有关问题

WBOY
WBOYasal
2016-06-13 11:17:51944semak imbas

修改xml文件值的问题
我想改变question为22222的值,这个值是在前台传入的,不过我不知道应该如何传,应该如何操作了?最好是用DOMDocument类来操作

<?xml  version="1.0" encoding="utf-8"?><br><parent><br>  <title>3</title><br>  <author>admin</author><br>  <contentall><br>    <subject><br>      <question>111111</question><br>      <option>
<br>        <oid>A</oid><br>        <content>11</content><br>      </option>
<br>      <option>
<br>        <oid>B</oid><br>        <content>22</content><br>      </option>
<br>      <option>
<br>        <oid>C</oid><br>        <content>33</content><br>      </option>
<br>      <option>
<br>        <oid>D</oid><br>        <content>44</content><br>      </option>
<br>    </subject><br>    <subject><br>      <question>22222</question><br>      <option>
<br>        <oid>A</oid><br>        <content>22</content><br>      </option>
<br>      <option>
<br>        <oid>B</oid><br>        <content>11</content><br>      </option>
<br>      <option>
<br>        <oid>C</oid><br>        <content>44</content><br>      </option>
<br>      <option>
<br>        <oid>D</oid><br>        <content>33</content><br>      </option>
<br>    </subject><br>    <subject><br>      <question>33333</question><br>      <option>
<br>        <oid>A</oid><br>        <content>444</content><br>      </option>
<br>      <option>
<br>        <oid>B</oid><br>        <content>222</content><br>      </option>
<br>      <option>
<br>        <oid>C</oid><br>        <content>333</content><br>      </option>
<br>      <option>
<br>        <oid>D</oid><br>        <content>2111</content><div class="clear">
                 
              
              
        
            </div>
</option></subject></contentall></parent>
Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Artikel sebelumnya:php 有损用组件 解析wordArtikel seterusnya:php paypal ipn解决方案