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

.net ³ÌÐò·¢²¼ºóxmlÎļþÕÒ²»µ½µÄÁ½ÖÖ½â¾ö·½·¨

×Ô¼º×öÏîÄ¿ÐèÒªÓÃÖÇÄÜ¿Í»§¶Ë·¢²¼£¬ÎÒÓöµ½Á˸öÎÊÌâ¾ÍÊdzÌÐòÖеÄxmlÎļþÔÚ·¢²¼ºóÕÒ²»µ½ÁË¡£¾­¹ýÔÚÍøÉϲéѯºÍ×Ô¼ºµÄÊÔÑé·¢ÏÖÕâÁ½¸ö·½·¨¶¼¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ¡£
·½·¨1
    ÓÒ¼üwinUIÏîÄ¿£¬·¢²¼-¡µÓ¦ÓóÌÐòÎļþ....->Ñ¡ÔñxmlÎļþ-¡µ·¢²¼×´Ì¬¸ÄΪ“Êý¾ÝÎļþ(×Ô¶¯)”
   
    ÔÚ³ÌÐòÀïÈ¡xml·¾¶µÄд·¨
    file = Application.CommonAppDataPath+@"\text\text.xml"£»
    Õâ¸ö·½·¨ÓиöÎÊÌâ¾ÍÊÇÔÚµ÷ÊÔ»·¾³Ï²»ÄÜÈ¡µ½ÕýÈ·µÄ·¾¶£¬Ö»Óз¢²¼µÄʱºòÈ¡µÄ·¾¶¶Ô¡£
·½·¨2
    ÓÒ¼üwinUIÏîÄ¿£¬·¢²¼-¡µÓ¦ÓóÌÐòÎļþ....->Ñ¡ÔñxmlÎļþ-¡µ·¢²¼×´Ì¬¸ÄΪ“°üÀ¨”
    ÔÚ³ÌÐòÀïÈ¡xml·¾¶µÄд·¨
    file = System.AppDomain.CurrentDomain.BaseDirectory + @"\text\text.xml"£»
    Õâ¸ö·½·¨µ÷ÊԺͷ¢²¼È¡µ½µÄ·¾¶¶¼ÊǶԵġ£


Ïà¹ØÎĵµ£º

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

À©Õ¹±ê¼ÇÓïÑÔXML£¨eXtensible Markup Language£©£¬ÊÇÓÉW3C×éÖ¯Öƶ¨µÄ¡£×öΪÓÃÓÚÌæ´úHTMLÓïÑÔµÄÒ»ÖÖÐÂÐ͵ıê¼ÇÓïÑÔ£¬XMLÄÚ²¿ÓÐןܶà»ù±¾±ê×¼£¬XML¾ÍÊÇͨ¹ýÓëÕâЩÏà¹Ø±ê×¼µØ½áºÏ£¬Ó¦ÓÃÓÚ¿Æѧ¼ÆËã¡¢µç×Ó³ö°æ¡¢¶àýÌåÖÆ×÷ºÍµç×ÓÉÌÎñµÄ¡£C££×÷ΪһÖÖÐÂÐ͵ijÌÐòÓïÑÔ£¬ÊÇ.Net¿ò¼ÜµÄÒ»¸öÖØÒª×é³É²¿·Ö£¬ËûºÍXMLµÄ¹ØϵÆÄÉî¡£±¾ÎÄ¾Í´Ó ......

XML XQuery

--XQuery »ùÓÚÏÖÓÐµÄ XPath ²éѯÓïÑÔ£¬²¢Ö§³Ö¸üºÃµÄµü´ú¡¢¸üºÃµÄÅÅÐò½á¹ûÒÔ¼°¹¹Ôì±ØÐèµÄ XML µÄ¹¦ÄÜ¡£
--1.ÉùÃ÷Ò»¸ö xml ÀàÐ͵ıäÁ¿£¬È»ºóʹÓà xml Êý¾ÝÀàÐ굀 query() ·½·¨À´²éѯ´Ë±äÁ¿
DECLARE @x xml
SET @x = '<ROOT><a>111</a></ROOT>'
SELECT @x.query('/ROOT/a')
--²éÕÒÊôÐÔaid=20µÄa½ ......

×÷µÄÒ»¸ö¼òµ¥µÄXML¹¦ÄÜ(1)

//ÅжϸÃxmlÎĵµÊÇ·ñ´æÔÚ£¬²»´æÔÚÔò´´½¨
  if (!File.Exists(Constants.SYS_CONFIGURE_URL + @"\SaveAccount.xml"))
                              &nbs ......

XMLNameSpace XMLÃüÃû¿Õ¼ä

XML ÃüÃû¿Õ¼äÌṩÁËÒ»ÖÖ±ÜÃâÔªËØÃüÃû³åÍ»µÄ·½·¨¡£
ÃüÃû¿Õ¼äÊôÐÔÒ»°ã·ÅÖÃÔÚÔªËصĿªÊ¼±ê¼Ç´¦£¬ÆäʹÓÃÓï·¨ÈçÏÂËùʾ:
xmlns:namespace-prefix="namespace"£¬
ÀýÈ磺xmlns:f="http://www.w3schools.com/furniture"
W3C ÃüÃû¹æ·¶ÉùÃ÷ÃüÃû¿Õ¼ä±¾Éí¾ÍÊÇÒ»¸öͳһ×ÊÔ´±êʾ·û£¬Uniform Resource Identifier (URI)¡£
asp.net¶ÁÈ¡X ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ