Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃasp¶ÁÈ¡xmlʱÇå³ý»º´æµÄÎÊÌâÓë½â¾ö°ì·¨

Ç°¶Îʱ¼ä¸ø¿Í»§×öÁ˼¸¸öÍøÒ³£¬¿Í»§ÒªÇóÔÚ×Ô¼ºµÄÍøÕ¾ÖÐÏÔʾ×Ô¼ºÔÚÐÂÀ˲©¿ÍÀïµÄÎÄÕ£¬×÷ΪÍøÕ¾µÄÒ»²¿·Ö¡£ÕâÑùµÄÇé¿ö¿ÉÒÔ½â¾ö£¬Ö÷Òª¿ÉÒÔͨ¹ý²©¿ÍÖÐµÄ XMLÀ´ÊµÏÖ£¬Í¨¹ýÓÃaspÀ´¶ÁÈ¡²©¿ÍÖÐXML£¬½«²©¿ÍÖеıêÌâ¡¢·¢²¼Ê±¼äµÈÐÅÏ¢ÏÔʾÔÚÍøÕ¾ÖС£µ«ÊÇÔÚʹÓõĹý³ÌÖУ¬³öÏÖÁËÒ»¸öÎÊÌ⣺µ±²©¿ÍÖÐÌí¼ÓÎÄÕºó£¬ÔÚÍøÒ³ÖжÁÈ¡²©¿ÍÖеÄXMLºó½øÐиüУ¬µ«ÊÇȴûÓм°Ê±¸üУ¬²éѯÁ˺ܶàÐÅÏ¢£¬·¢ÏÖÊÇÍøվûÓм°Ê±¸üÐÂXMLÊý¾Ý¶øÔì³ÉµÄ¡£ÈçºÎ½â¾ö£¿ÏÈÊdz¢ÊÔÇå³ýÍøÕ¾µÄ»º´æ£¬ÉèÖÃÍøÕ¾ÖеÄHTTPÍ·£ºCache-ControlºÍÖµ£ºno-cache¡£ÉèÖúó½øÐвâÊÔ£¬·¢ÏÖЧ¹û²»ºÃ£¬Ö÷ÒªÎÊÌâÊÇÕâÑùµÄÉèÖÃÖ»ÊÇÇå³ýÁËÍøÕ¾ÄÚËù°üº¬µÄͼƬ£¬Îı¾µÈ»º´æ£¬Ã»ÓиüÐÂXML»º´æ£¬ËùÒÔûÓнâ¾öÇ°ÃæµÄÎÊÌâ¡£
 
       ÎÞÄÎÖ»ÄÜÔÙ²éÕÒ£¬ËùÐÒÔÚCSDNÖп´µ½Ò»ÆªÎÄÕ£¬½éÉÜÇå³ý»º´æµÄºÃ°ì·¨ÊǸıä˼·£¬²»ÊÇÇå³ýÄÚÈÝ£¬¶øÊÇÇ¿ÐмÓÔØÒª¸üеÄÄÚÈÝ¡£Ö÷Ҫ˼·ÊÇÔÚ´ò¿ªµÄ·¾¶ÖÐÌí¼ÓËæ»úÊý£¬ÒòΪÔÚiisÖзÃÎʲ»Í¬µÄ·¾¶Ê±£¬ÄÚÈÝÊÇÇ¿ÐмÓÔصģ¬Ã»Óе÷Óûº´æ¡£ÓÐÁËÕâ¸ö˼·£¬¸Ä¶¯³ÌÐò¾Í±È½Ï·½±ãÁË¡£¾ßÌå´úÂëÈçÏ£º
<%
dim xmlDoc
dim http
dim bitem
dim bi
dim title
dim link
dim pubdate
dim days
dim months
dim NM
dim xmlseed
dim conn,strconn,rs
dim ReadSinaRss
Randomize 'Ôö¼ÓËæ»úÊý³õʼ»¯Óï¾ä
'Ô­±¾µÄ¸³ÖµÓï¾äΪ£ºxmlseed="http://blog.sina.com.cn/rss /adsbaby.xml"£¬Ð޸ĺóΪ£º
xmlseed="http://blog.sina.com.cn/rss/adsbaby.xml?tmp="&int(rnd*1000)
’×¢Ò⣺ÔÚURLµØÖ·ÖУ¬×îºóÔö¼Ó”?xxx=number“ÕâÖÖÐÎʽ¶Ôä¯ÀÀÄÚÈݲ»»áÓ°Ï죬ÊÇÈÃä¯ÀÀµØÖ·ÄÚÈÝÖØмÓÔصÄÒ»ÖֱȽϺõİ취
Set http=Server.CreateObject("Microsoft.XMLHTTP")
http.Open "GET",xmlseed,False
http.send
Set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.Async=False
xmlDoc.ValidateOnParse=False
xmlDoc.Load(http.ResponseXML)
Set bitem=xmlDoc.getElementsByTagName("item")
if bitem.Length>=0 then
ReadSinaRss="<table width=100% cellpadding=0 cellspacing=0>"
For bi=0 To (bitem.Length-1)
 if bi<=5 then
 
  Set pubdate=bitem.Item(bi).getElementsByTagName("pubDate")
  Set title=bitem.Item


Ïà¹ØÎĵµ£º

flexͨ¹ýHTTPService×é¼þ¶ÁÈ¡¸´ÔӽṹµÄxmlÎļþ

    ŪÁËÁ½Ì죬ÖÕÓڰѸ´ÔÓµÄxmlÎļþµÄÊý¾Ý¸ù¾Ý×Ô¼ºµÄÒªÇó¶Á³öÀ´£¬ÏÔʾÔÚÒ³ÃæÉÏÁË¡£flexͨ¹ýHTTPService×é¼þ·¢ËÍÇëÇ󣬶ÁÈ¡xmlÎļþÖÐÊý¾Ý£¬ÓÃxmllistcollection´æ´¢xmlÖÐijһ²¿·ÖÊý¾Ý£¬²¢°ó¶¨ÔÚgridview¿Ø¼þÉÏ¡£
    xml£¬xmllist£¬xmllistcollectionÖÐÖ»ÓÐxmllistcollection¾ßÓÐÐ޸ĸüÐÂÊý¾ ......

VC¶ÁдXMLÎļþ

MSXML2::IXMLDOMDocumentPtr pDoc;
MSXML2::IXMLDOMElementPtr  xmlRoot ;
 // ´´½¨DOMDocument¶ÔÏó
 HRESULT hr  =  pDoc.CreateInstance(__uuidof(MSXML2::DOMDocument40));
 if ( ! SUCCEEDED(hr))
  { 
 MessageBox( " ÎÞ·¨´´½¨DOMDocument¶ÔÏó£¬Çë¼ì²é ......

XML ÐòÁл¯¼ò½é

ÐòÁл¯Êǽ«¶ÔÏóת»»³ÉÒ×ÓÚ´«ÊäµÄÐÎʽµÄ¹ý³Ì¡£ÀýÈ磬¿ÉÒÔÐòÁл¯¶ÔÏ󣬲¢Ê¹Óà HTTP ͨ¹ý Internet ÔÚ¿Í»§¶ËºÍ·þÎñÆ÷Ö®¼ä½øÐд«Êä¡£ÁíÒ»·½Ã棬·´ÐòÁл¯ÔÚÁ÷ÖÐÖØй¹½¨¶ÔÏó¡£
XML ÐòÁл¯Ö»½«¶ÔÏóµÄ¹«¹²×ֶκÍÊôÐÔÖµÐòÁл¯Îª XML Á÷¡£XML ÐòÁл¯²»°üÀ¨ÀàÐÍÐÅÏ¢¡£ÀýÈ磬Èç¹û Library ÃüÃû¿Õ¼äÖдæÔÚ Book ¶ÔÏó£¬Ôò²»Äܱ£Ö¤½«Ëü·´ ......

C#ɾ³ýXML½áµãµÄ¼òµ¥Àý×Ó

½ÓÉÏһƪ
ɾ³ýÔ­genreÊôÐÔ£¬É¾³ýleixing=loveµÄËùÓнáµã¡£
1 Ô­xmlÎļþ bookstore.xml
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
  <book genre="love" ISBN="1234123">
    <title>who am i </title>
    <author>who</aut ......

¾«Æ·´úÂë ÓÃasp´´½¨Êý¾Ý¿â

ÔÚÍøÉÏ¿´µ½ºÜ¶àÕâ·½ÃæµÄ´úÂ룬µ«ÊÇÓÐЩÊDz»ÄÜÓã¬ÓÐЩÊÇÀ¬»ø´úÂëÌ«¶à£¬ÎÒ¼òµ¥µÄÐÞ¸ÄÁËÒ»ÏÂÏÖÔÚÓë´ó¼Ò¹²Ïíһϡ£
<%
Option Explicit
dim databasename '¶¨ÒåÊý¾Ý¿âÃû³Æ
databasename="database.mdb"    'Êý¾Ý¿âÃû³Æ
dim databasepath '¶¨ÒåÊý¾Ý¿â´æ·Å·¾¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ