for xml auto 问题?怎么在页面显示
用for xml auto 子句得到如下表,但是不能在页面显示,
<test ID="1" col1="1" col2="b" col3="1" /><test ID="2" col1="1" col2="c" col3="4" /><test ID="3" col1="1" col2="a" col3="9" /><test ID="4" col1="1" col2="b" col3="16" /><test ID="5" col1="1" col2="c" col3="25" /><test ID="6" col1="1" col2="a" col3="36" /><test ID="7" col1="1" col2="b" col3="49" />
System.Xml.XmlReader xr = Command.ExecuteXmlReader(); xr.Read(); while (!xr.EOF) { Response.Write(Server.HtmlEncode(xr.ReadOuterXml())); } xr.Close();