日期:2014-05-17  浏览次数:20634 次

修改xml文件值的问题
我想改变question为22222的值,这个值是在前台传入的,不过我不知道应该如何传,应该如何操作了?最好是用DOMDocument类来操作
<?xml version="1.0" encoding="utf-8"?>
<parent>
  <title>3</title>
  <author>admin</author>
  <contentall>
    <subject>
      <question>111111</question>
      <option>
        <oid>A</oid>
        <content>11</content>
      </option>
      <option>
        <oid>B</oid>
        <content>22</content>
      </option>
      <option>
        <oid>C</oid>
        <content>33</content>
      </option>
      <option>
        <oid>D</oid>
        <content>44</content>
      </option>
    </subject>
    <subject>
      <question>22222</question>
      <option>
        <oid>A</oid>
        <content>22</content>
      </option>
      <option>
        <oid>B</oid>
        <content>11</content>
      </option>
      <option>
        <oid>C</oid>
        <content>44</content>
      </option>
      <option>
        <oid>D</oid>
        <content>33</content>
      </option>
    </subject>
    <subject>
      <question>33333</question>
      <option>
        <oid>A</oid>
        <content>444</content>
      </option>
      <option>
        <oid>B</oid>
        <content>222</content>
      </option>
      <option>
        <oid>C</oid>
        <content>333</content>
      </option>
      <option>