´ÓXMLÖÐÌáÈ¡¶¯Ì¬µÄSQLÓï¾äµÄÎÊÌâ
ÎÒÒѾ°Ñselect * from user дµ½ÁËSql.xmlÖÐ
ÔÚReadXML.csÀï¶ÁÈ¡ÆäÓï¾äµÄ´úÂëÈçÏÂ:
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load("E:\\program1\\ConsoleApplication1\\ConsoleApplication1\\Sql.xml");
string path = "//sql";
XmlNodeList nodeList = xmldoc.SelectNodes(path);
XmlNode xmlNode = nodeList[0];
string[] strTemp=xmlNode.InnerXml.ToString().Split(';');
for (int i = 0; i < strTemp.Length; i++)
{
Console.WriteLine(strTemp[i].ToString());
}
string connStr = "server=192.168.0.189;database=mysql;uid=cm;pwd=cm";
MySqlConnection conn = new MySqlConnection(connStr);
string sql=strTemp[0];
conn.Open();
MySqlCommand cmd = new MySqlCommand(sql,conn);
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
<?xml version="1.0" encoding="utf-8" ?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
ÎÒÓÐÒ»¸öÀàËÆµÄxmlµÄ string£¬Ïëͨ¹ý±éÀúÔõô¸öxml Êä³öÎÒÏëÒªµÄelementµÄÖµ
xml Ϊ£º
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_ME ......