日期:2014-05-17 浏览次数:20487 次
protected void Page_Load(object sender, EventArgs e)
{
DataSet dt = new DataSet();
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=D:\\Visual Studio 2008\\WebSites\\4-2\\App_Data\\media.mdb");
OleDbCommand cmd = new OleDbCommand("select MPlaypath,MName from Media", conn);
OleDbDataAdapter oda = new OleDbDataAdapter(cmd);
oda.Fill(dt);
cmd.Dispose();
conn.Close();
dt.WriteXml(Server.MapPath("test.xml"));
}
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<Table>
<MPlaypath>test4</MPlaypath>
<MName>test2</MName>
</Table>
<Table>
<MPlaypath>test4</MPlaypath>
<MName>test2</MName>
</Table>
</NewDataSet>
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Stream>
<rtmpHost>test2</rtmpHost>
<StreamName>test3</StreamName>
</Stream>
<Stream>
<rtmpHost>test2</rtmpHost>
<StreamName>test3</StreamName>
</Stream>
<menu>
<StreamName>test3</StreamName>
<StreamName>test3</StreamName>
</menu>
</root>
protected void Page_Load(object sender, EventArgs e)
{
DataSet dt = new DataSet();
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=D:\\Visual Studio 2008\\WebSites\\4-2\\App_Data\\media.mdb");
OleDbCommand cmd = new OleDbCommand("select MPlaypath,MName from Medi