ÈçºÎÓÃGridview±à¼Ã»ÓнڵãµÄXMLÎĵµ
×öÒ»¸ö¿Ø¼þÏëÒªÊǶÁÈ¡XMLÎļþ²¢ÇÒ¿ÉÒÔÔÚÍøÒ³Àï±à¼XMLÎļþµÄÄÚÈÝ ÎÒÊÇÓõÄGridviewÄܹ²³É¹¦¶ÁÈ¡XMLÎļþµ«ÊÇÏÖÔÚÏëÒªÔÚGridviewÀïÄܹ»±à¼Ëù¿´µ½µÄÊý¾Ý²¢ÇÒÔÙµã»÷Update°´Å¥µÄʱºò½«ÐµÄÊý¾ÝÔÚXMLÀïÃæ¸üÐÂ
<?xml version="1.0" encoding="gb2312"?>
<viewer interval="3000" isRandom="0">
<item title="1" img="images/01.jpg" url="http://www.google.cn" target="_blank" />
<item title="2" img="images/02.jpg" url="http://www.google.cn" target="_blank" />
<item title="3" img="images/03.jpg" url="http://www.google.cn" target="_blank" />
<item title="4" img="images/04.jpg" url="http://www.google.cn" target="_blank" />
<item title="5" img="images/05.jpg" url="http://www.google.cn" target="_blank" />
</viewer>
C# code:
public partial class XML : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private void ReadXML()
{
string url = Server.MapPath("viewerData.xml");//»ñµÃµ±Ç°Îļþ¼ÐϵÄXMLÎļþ
StreamReader sRead = new StreamReader(url, Sy
Ïà¹ØÎÊ´ð£º
ÎÒÊÇÀûÓÃaxiom¶Ôxml½øÐнâÎö£¡
µ«È´³öÏÖÏÂÃæµÄ´íÎó£¡
Exception in thread "main" org.apache.axiom.om.OMException: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxUnexpectedCharEx ......
txt ºÍXML ¸ñʽÏàÓ¦
²»½èÖúDataSet
µ¼Èë¶ÁÈ¡TXTÎļþ
È»ºóÖ±½ÓдÈëXML(ͬһÎļþ,²»Í¬Êý¾Ý,µÝÔöÔÊý¾ÝûÓб»¸²¸ÇÇé¿öÏÂÔö¼ÓÊý¾Ý.)
½Ì¸öÒªµã»ò×îºÃÊÇÓиö´úÂëÌáʾµÄ
¹ý·ºÃºº °ï¸öæÈö^^
²»»á£¬°ïÂ¥Ö÷ ......
Òò¹«Ë¾ÒµÎñÐèÇó£¬Ðèͨ¹ýÍøÕ¾»ñÈ¡¿Í»§µÄһЩ×ÊÁÏÐÅÏ¢¡£Îª·½±ã¿Í»§£¬ÎÒÃÇÕâ±ßÐèÒªÉè¼ÆÒ»¸öͳһµÄ½Ó¿ÚÎĵµ£¬ÓÃÀ´ÔÚÎÒÃÇÍøÕ¾ºÍ¿Í»§ÍøÕ¾½»»»Êý¾Ý£¬³õ²½µÄÏë·¨Êǿͻ§ÍøÕ¾°´ÎÒÃÇÖ¸¶¨µÄ¸ñʽÉú³ÉXMLÎĵµ£¬È»ºóÎÒÃÇÈ¥¶ÁÈ¡¡£ÏÖÔ ......
<?xml version="1.0" encoding="gb2312" ?>
<sites>
<site>
<name>.Net¿ª·¢ÕßÔ°µØ</name>
<url>http://dotnet.aspx.cc</url>
<img&g ......
ºÃ ÎÒÏëѧϰXMLºÃÊ飬ÇëÎÊÓÐʲôÊ飬¿ÉÒÔÉîÈëµÄѧϰÏÂµÄ Ð»Ð»
ÎÞ·Ï»°XML ̨ÍåÁ½Ö»ÀÏ»¢
XMLÈëÞµä
ÓÑÇé °ï¶¥¡£
ÎÞ·Ï»°XML ̨ÍåÁ½Ö»ÀÏ»¢ÖªÊ¶µã±È½ÏÉÙ
XML´ÓÈëÃŵ½¾«Í¨
......