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

C#¶ÔxmlµÄ²Ù×÷ʵÀýÔ´Âë

À©Õ¹±ê¼ÇÓïÑÔXML£¨eXtensible Markup Language£©£¬ÊÇÓÉW3C×éÖ¯Öƶ¨µÄ¡£×öΪÓÃÓÚÌæ´úHTMLÓïÑÔµÄÒ»ÖÖÐÂÐ͵ıê¼ÇÓïÑÔ£¬XMLÄÚ²¿ÓÐןܶà»ù±¾±ê×¼£¬XML¾ÍÊÇͨ¹ýÓëÕâЩÏà¹Ø±ê×¼µØ½áºÏ£¬Ó¦ÓÃÓÚ¿Æѧ¼ÆËã¡¢µç×Ó³ö°æ¡¢¶àýÌåÖÆ×÷ºÍµç×ÓÉÌÎñµÄ¡£C££×÷ΪһÖÖÐÂÐ͵ijÌÐòÓïÑÔ£¬ÊÇ.Net¿ò¼ÜµÄÒ»¸öÖØÒª×é³É²¿·Ö£¬ËûºÍXMLµÄ¹ØϵÆÄÉî¡£±¾ÎľʹÓÒ»¸ö·½ÃæÀ´Ì½ÌÖÒ»ÏÂÕâ¶þÕߵĹØϵ¡£¼´£º¿´ÓÃC££ÈçºÎÀ´´´½¨ºÍ¶ÁÈ¡XMLÎĵµ¡£
Ò»£® ±¾ÎijÌÐòÉè¼ÆºÍÔËÐеÄÈí¼þ»·¾³£º
£¨Ò»£©.΢Èí¹«Ë¾ÊÓ´°2000·þÎñÆ÷°æ
£¨¶þ£©..Net FrameWork SDK Beta 2
¶þ£® C££´´½¨XMLÎĵµ£º
ÔÚ±¾ÎÄÖÐÎÒÃÇÀ´½éÉÜÒ»ÏÂÓÃC££´´½¨XMLÎĵµµÄ¶þÖÖ·½·¨£¬Õâ¶þÖÖ·½·¨¸÷ÓÐǧÇµÚÒ»ÖÖ´´½¨ÆðÀ´¸üÁé»î£¬µÚ¶þÖÖ´´½¨ÆðÀ´¸ü·½±ã¡£
£¨Ò»£©.C££´´½¨XMLÎĵµµÄµÚÒ»ÖÖ·½·¨£º
ÕâÒ»ÖÖ·½·¨ÊÇ°´ÕÕ°´ÕÕXMLµÄ½á¹¹Ò»²½Ò»²½µÄ¹¹½¨XMLÎĵµ¡£C££¹¹½¨XMLÎĵµÍ¨¹ý.Net FrameWork SDKÖеÄÃüÃû¿Õ¼ä"System.Xml"Öзâ×°µÄ¸÷ÖÖÀàÀ´ÊµÏֵġ£ÏÂÃæ¾Í°´ÕÕÒ»¸öXMLµäÐÍÎĵµ½á¹¹À´½éÉÜһϡ£
£¨1£©.Ê×ÏÈÒª´´½¨Ò»¸ö¿ÕµÄXMLÎĵµ£º
ÔÚÃüÃû¿Õ¼ä"System.Xml"ÖÐÓÐÒ»¸öÀà"XmlDocument"£¬C££Í¨¹ýÕâ¸öÀàÀ´ÃèÊöXMLÎĵµ¡£ÏÂÃæÊÇÓÃC££´´½¨Ò»¸öXMLÎĵµ¡£
xmldoc = new System.Xml.XmlDocument ( ) ;  
£¨2£©.ÔÚXMLµÄÎĵµµÄ×îÍ·²¿¼ÓÈëXMLµÄÉùÃ÷¶ÎÂ䣺
ÀûÓÃ"XmlDocument"ÀàÖÐµÄ "CreateNode" ·½·¨¿ÉÒÔ´´½¨Ò»¸öÖ¸¶¨ÀàÐ͵ÄXML½Úµã£¬"CreateNode" ·½·¨µÄµ÷Ó÷½·¨×ܹ²ÓÐÈýÖÖ£¬ÔÚ±¾ÎÄÖÐʹÓõÄÆäÒ»°ãµÄ·½·¨£¬¾ßÌåÓï·¨ÈçÏ£º
XmlDocument.CreateNode Method ( XmlNodeType , String , String )
È»ºóÔÚÀûÓÃ"XmlDocument"ÀàÖеÄ"AppendChild"·½·¨ÔÚXMLÎĵµÖмÓÈë´Ë½Úµã£¬ÓÃC££ÔÚXMLÎĵµÖмÓÈëÉùÃ÷¶ÎÂäʵÏÖµÄÓï¾äÈçÏ£º
xmlnode = xmldoc.CreateNode ( XmlNodeType.XmlDeclaration , "" , "" ) ;
xmldoc.AppendChild ( xmlnode ) ;
£¨3£©.ΪXMLÎĵµ¼ÓÈëÔªËØ£¨element£©£º
¼ÓÈëÊý¾ÝÄÚÈÝÊÇͨ¹ýÔªËØ£¬ÔÚ"XmlDocument"ÀàÖÐÌṩÁ˶þ¸ö·½·¨£º"CreateElement"ºÍ"CreateTextNode"¡£ÆäÖеÚÒ»¸ö·½·¨ÊÇÔÚXMLÖд´½¨Ò»¸öÔªËØ£¬ÁíÍâÒ»¸ö·½·¨ÊÇΪ´´½¨µÄÔªËØÖ¸¶¨Îı¾Öµ¡£ÏÂÃæÊÇΪÉÏÃæ´´½¨µÄXMLÎĵµ¼ÓÈëÒ»¸ö¸ùÔªËØ¡£
xmlelem = xmldoc.CreateElement ( "" , "ROOT" , "" ) ;
xmltext = xmldoc.CreateTextNode ( "Root Text" ) ;
×¢ÊÍ£ºÆäÖÐ"xmlelem"ÊÇ´´½¨µÄ"XmlElement"¶ÔÏó£¬"xmltext"ÊÇ"XmlText"¶ÔÏó
ÓÐÁË´´½¨Ò»¸öXMLÔªËصÄÀý×Ó£¬¾Í¿ÉÒÔ¸ù¾ÝXMLÎĵµÖ


Ïà¹ØÎĵµ£º

XMLÊý¾Ýµº¼¼ÊõµÄ×ܽá

  ×î½ü×öµÄÒ»¸öÏîÄ¿ÖÐÔËÓà xml Êý¾Ýµº¼¼Êõ£¬ËùÒÔ°ÑÊý¾Ýµº·½ÃæµÄ֪ʶ×ܽáһϡ£
  XML Êý¾Ýµº £¨ data islands £©¾ÍÊDZ» html Ò³ÃæÒýÓûòÕß°üº¬µÄ xml Êý¾Ý£¬ÊÇ´Ó IE5 ¿ªÊ¼ÒýÈëµÄÒ»Ïî¼¼Êõ¡£¿ÉÒÔͨ¹ý xml ±êÇ©ºÜÇáËɽ«Êý¾Ýµº²åÈëµ½ html ÎĵµÖС£ÄÇôÔõô·ÃÎÊ xml Êý¾ÝµºµÄÊý¾ÝÄØ£¬ºÜ¼òµ¥£¬Í¨¹ý xml µÄ id ¡£ÔÚÒ³ ......

C#²Ù×÷xml

ÒýÓÃÃüÃû¿Õ¼ä£ºusing System.Xml 
1.¼ì²éËùÒª²Ù×÷µÄxmlÎļþÊÇ·ñ´æÔÚ£º
   System.IO.File.Exists(Îļþ·¾¶¼°Ãû³Æ);
2.µÃµ½xmlÎļþ£º
£¨1£©ÔÚasp.netÖпÉÒÔÕâÑùµÃµ½:
XmlDocument xmlDoc = new XmlDocument();
//µ¼ÈëxmlÎĵµ
xmlDoc.Load( Server.MapPath("xmlTesting.xml"));
//µ¼Èë×Ö·û´®
/ ......

ÈçºÎץȡÍøÒ³Êý¾Ý¡¢·ÖÎö²¢ÇÒÈ¥³ýHtml±êÇ©(C#)

<@Aattention Content="±¾BlogÔ­´´ÎÄÕ£¬×ªÔØ»òÒýÓÃÇë×¢Ã÷תÔØ"
from="Robby.cnblogs.com"@>
      ÓÉÓÚ×Ô¼ºµÄËÑË÷ÒýÇæÖÐ×öµ½ÁËÕâÒ»¿éÄÚÈÝ£¬ËùÒÔ½ñÌì˵˵ÈçºÎץȡÍøÒ³Êý¾Ý¡¢·ÖÎö²¢ÇÒÈ¥³ýHtml±êÇ©£¬¸ø´ó¼ÒÌṩһ¸ö²Î¿¼¡£ÎÒµÄƽ̨ÊÇVisual
Studio2005£¬C#¡£
& ......

socket, nio socket£¬¼°xml´«µÝobject ·½·¨

1£ºÈçºÎͨ¹ýsocket´úÀíÀ´·ÃÎÊ·þÎñ¶Ë£º
String proxyHost = 
"192.168.204.212"
;   

String proxyPort = 
"1080"
;   

  

//֪ͨJavaҪͨ¹ý´úÀí½øÐÐÁ¬½Ó¡£
ÕýÔÚ×°ÔØÊý¾Ý……
  

System.get ......

asp.net c# ·þÎñÆ÷¶Ë¸÷°ó¶¨¿Ø¼þ³£ÓÃ

asp.netÓÐʱºò³£³£Ó÷þÎñÆ÷°ó¶¨¿Ø¼þÓÐЩÂé·³...
´úÂëÓÐЩÔÓ....
using System;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Web;
using System.Text;
namespace pub.mo
{
public class bind
{
p ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ