xml获取属性值的方法
sSqlstr += string.Format(@" and businessattr.value('(/Arch/Field[@Name=""发文单位$$""])[1]','varchar(50)') like '%{0}%'", Request.QueryString["FaWenDanWei"]);
private string GetFaWenDanWei(string businessAttrXml)
{
string result = string.Empty;
XmlDocument doc = new XmlDocument();
doc.LoadXml(businessAttrXml);
var node = doc.SelectSingleNode("Arch/Field[@Name='发文单位$$']");
if (node != null)
{
result = node.InnerText;
}
return result;
}