http://expert.csdn.net/Expert/topic/1039/1039349.xml?temp=.3476984

解决方案 »

  1.   

    <html>
       <head>
          <title>Enter the title of your HTML document here</title>
          <script language="JavaScript">
          function goRec(field){
           var row=field.rowIndex;
           xmlid.recordset.absoluteposition=row
           xmlid1.recordset.absoluteposition=row
                 }
          </script>
       </head>
       <body>
        <table datasrc=#xmlid border="1">
        <thead>
    <tr>
    <th>id</th><th>name</th><th>sex</th><th>title</th>
    </tr>
    </thead>
    <tbody>
    <tr datafld="data/item" onclick="goRec(this)">
    <td><span datafld=id></span></td>
    <td><span datafld=name></span></td>
    <td><span datafld=sex></span></td>
    <td><span datafld=title></span></td>
    </tr>
    </tbody>
    </table>
    <p>id:<input type="text" readonly size="3" name=eid datasrc=#xmlid datafld="id"></input></p>
        <p>name:<input type="text" name=ename size="12" datasrc=#xmlid datafld="name"></input></p>
    <p>sex:<INPUT TYPE=RADIO NAME=radBindable VALUE=男 DATASRC=#xmlid DATAFLD="sex">男
           <INPUT TYPE=RADIO NAME=radBindable VALUE=女 DATASRC=#xmlid DATAFLD="sex">女</p>
           <p>title:<select datasrc=#xmlid datafld=title>
    <option value="经理">经理</option>
    <option value="技术总监">技术总监</option>
    <option value="秘书">秘书</option>
    <option value="职员">职员</option>
    </select>        
            </p>
           <p>authority:<input type="checkbox" datasrc=#xmlid1 datafld="east">东区
           <input type="checkbox" datasrc=#xmlid1 datafld="north">南区
           <input type="checkbox" datasrc=#xmlid1 datafld="sourth">西区
           <input type="checkbox" datasrc=#xmlid1 datafld="west">北区
           </p>
       </body>
    </html>
    <xml id=xmlid>
    <data>
    <item>
    <id>1</id>
    <name>王雨</name>
    <sex>男</sex>
    <title>经理</title>
    </item>
    <item>
    <id>2</id>
    <name>Kelly</name>
    <sex>女</sex>
    <title>秘书</title>
    </item>
    <item>
    <id>3</id>
    <name>陈宏</name>
    <sex>男</sex>
    <title>职员</title>
    </item>
    <item>
    <id>4</id>
    <name>祈宏</name>
    <sex>男</sex>
    <title>职员</title>
    </item>
    </data>
    </xml>
    <xml id=xmlid1>
    <data>
    <authority eid="1">
    <east>true</east>
    <north>true</north>
    <sourth>true</sourth>
    <west>true</west>
    </authority>
    <authority eid="2">
    <east>false</east>
    <north>false</north>
    <sourth>false</sourth>
    <west>false</west>
    </authority>
    <authority eid="3">
    <east>false</east>
    <north>true</north>
    <sourth>false</sourth>
    <west>false</west>
    </authority>
    <authority eid="4">
    <east>true</east>
    <north>false</north>
    <sourth>false</sourth>
    <west>false</west>
    </authority>
    </data>
    </xml>
      

  2.   

    try something like
    <xml id="xmldoc">  
    <root>
    <area>
    <module>名称1</module>
    <file>
    <file_name>属性名称</file_name>
    <file_value>属性值</file_value>
    </file>
    </area>
    <area>
    <module>名称2</module>
    <file>
    <file_name>1111</file_name>
    <file_value>2222</file_value>
    </file>
    </area>
    </root>
    </xml><table border="1" datasrc="#xmldoc">
    <tr>
    <td><span datafld="module"></span></td>
    <td>
    <table border="1" datasrc="#xmldoc" datafld="file">
    <tr>
    <td><span datafld="file_name"></span></td>
    <td><span datafld="file_value"></span></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>