//This is my xml file
<sql id="data8">select .......... and DATEDIFF(CURDATE(),modified_date) > 7 group by ......</sql>
//And i am accessing this in webmethod in aspx.cs page.
var doc = new XmlDocument();
doc.Load(Server.MapPath("XMLFile.xml"));
string cmdstr = doc.DocumentElement.SelectSingleNode("//queries/sql[@id='data8']").InnerXml;
但我收到错误“'where子句'中的未知列'gt'”。请帮忙
答案 0 :(得分:2)
请尝试阅读InnerText属性的值而不是InnerXml