<? XML version = "1.0" encoding = "gb2312" standalone = "yes"?>
<MSG version = "4" msgid = "1118732851" type = "tvmonup" datetime = "15:07:31" srccode = "320200n01" dstcode = "997777x10" replyid = "66">
<Return type = "streamsimplequery" value = "0" DESC = "? ">
</Return>
<Stream>
<Mediastream Index = "0" url = "http: // 10.40.30.2/playlist/42_0_42ae8233.asx"/>
</Stream>
</MSG>
Default. aspx. CS code:
Private void page_load (Object sender, system. eventargs E)
{
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @ Website development: lawdoor
// @ Page design: lawdoor
// @ MSN contact: tacit@hotmail.com
/// @ Qq contact: 5985880
// @ Site: http://www.cnsdn.com.cn
// @ Email: lawdoor@126.com
// @ Copyright: chinanetcenter [longmai technology]
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// Retrieve system. XML Information from the system
Xmldocument United = new xmldocument ();
United. Load ("C: // winnt // config // system. xml ");
String XPath = "/MSG/stream/paths ";
// Obtain the URL
Xmlnode mstreams = United. selectsinglenode (XPath );
String xmlpath = mstreams. attributes ["xmlpath"]. innertext;
Datetime d = datetime. now;
String filepath = "" + xmlpath + "" + D. tostring ("yyyymmddhhmmss") + ". xml ";
Request. saveas (filepath, false );
// Create a document
Xmldocument unite = new xmldocument ();
Unite. Load (filepath );
// Define the Node path
String xpath1 = "/MSG/stream/mediastream ";
String xpath2 = "/MSG ";
// Obtain the URL
Xmlnode mstream = unite. selectsinglenode (xpath1 );
String url = mstream. attributes ["url"]. innertext;
// Obtain the replyid
Xmlnode replyid = unite. selectsinglenode (xpath2 );
String id = replyid. attributes ["replyid"]. innertext;
// Connect to the Oracle database
String connstring = "Data Source = searches; user id = searches; Password = 1234 ";
// Instantiate the oracleconnection object
Oracleconnection myconnection = new oracleconnection (connstring );
String sqlstr = "ins * RT into down_asx (task_id, asxurl, xmlname, adtime) values ('" + ID + "', '" + URL + "', '"+ filepath +"', '"+ D + "')";
Oraclecommand mycommand = new oraclecommand (sqlstr, myconnection );
Mycommand. Connection. open ();
Mycommand. executenonquery ();
Myconnection. Close ();
}