HTML和XML交互

============== HTML Begin =============
<acronym></acronym><xml src="C:\\temp\\cd_catalog.xml" id="xmldso" async="false"></xml>

<table datasrc="#xmldso" width="100%" border="1">
 <thead>
  <th>Title</th>
  <th>Artist</th>
  <th>Year</th>
 </thead>
 <tr align="left">
  <td><span datafld="TITLE"></span></td>
  <td><span datafld="ARTIST"></span></td>
  <td><span datafld="YEAR"></span></td>
 </tr>
</table
============== HTML End =============

============== cd_catalog.xml Begin =============
<?xml version="1.0" encoding="UTF-8"?>
<CATALOG>
 <CD>
  <TITLE>Empire Burlesque</TITLE>
  <ARTIST>Bob Dylan</ARTIST>
  <COUNTRY>USA</COUNTRY>
  <COMPANY>Columbia</COMPANY>
  <PRICE>10.90</PRICE>
  <YEAR>1985</YEAR>
 </CD>
 <CD>
  <TITLE>Hide your heart</TITLE>
  <ARTIST>Bonnie Tyler</ARTIST>
  <COUNTRY>UK</COUNTRY>
  <COMPANY>CBS Records</COMPANY>
  <PRICE>9.90</PRICE>
  <YEAR>1988</YEAR>
 </CD>
 <CD>
  <TITLE>Greatest Hits</TITLE>
  <ARTIST>Dolly Parton</ARTIST>
  <COUNTRY>USA</COUNTRY>
  <COMPANY>RCA</COMPANY>
  <PRICE>9.90</PRICE>
  <YEAR>1982</YEAR>
 </CD>
</CATALOG>
============== cd_catalog.xml Enc=============

效果图,如下附近

你可能感兴趣的:(html,C++,c,xml,C#)