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

XML(È«£©

XML£¨Extensible Markup Language£©¼´¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¬ËüÓëHTMLÒ»Ñù£¬¶¼ÊÇSGML(Standard Generalized Markup Language,±ê׼ͨÓñê¼ÇÓïÑÔ)¡£XmlÊÇInternet»·¾³Öпçƽ̨µÄ£¬ÒÀÀµÓÚÄÚÈݵļ¼Êõ£¬Êǵ±Ç°´¦Àí½á¹¹»¯ÎĵµÐÅÏ¢µÄÓÐÁ¦¹¤¾ß¡£À©Õ¹±ê¼ÇÓïÑÔXMLÊÇÒ»ÖÖ¼òµ¥µÄÊý¾Ý´æ´¢ÓïÑÔ£¬Ê¹ÓÃһϵÁмòµ¥µÄ±ê¼ÇÃèÊöÊý¾Ý£¬¶øÕâЩ±ê¼Ç¿ÉÒÔÓ÷½±ãµÄ·½Ê½½¨Á¢£¬ËäÈ»XMLÕ¼ÓõĿռä±È¶þ½øÖÆÊý¾ÝÒªÕ¼Óøü¶àµÄ¿Õ¼ä£¬µ«XML¼«Æä¼òµ¥Ò×ÓÚÕÆÎÕºÍʹÓá£
¡¡¡¡XMLʵÀý
¡¡¡¡<?xml version="1.0" encoding="ISO-8859-1"?>
¡¡¡¡<bookstore>
¡¡¡¡<book catalog="Programming">
¡¡¡¡<title lang="en">C++ Programming Language</title>
¡¡¡¡<author>Bjarne Stroustrup</author>
¡¡¡¡<year>1998</year>
¡¡¡¡<price>98.0</price>
¡¡¡¡</book>
¡¡¡¡<book catalog="Networking">
¡¡¡¡<title lang="en">TCP/IP Illustrated</title>
¡¡¡¡<author>Richard Stevens</author>
¡¡¡¡<year>1996</year>
¡¡¡¡<price>56.0</price>
¡¡¡¡</book>
¡¡¡¡</bookstore>
¡¡¡¡XMLÓëAccess,OracleºÍSQL ServerµÈÊý¾Ý¿â²»Í¬£¬Êý¾Ý¿âÌṩÁ˸üÇ¿ÓÐÁ¦µÄÊý¾Ý´æ´¢ºÍ·ÖÎöÄÜÁ¦£¬ÀýÈ磺Êý¾ÝË÷Òý¡¢ÅÅÐò¡¢²éÕÒ¡¢Ïà¹ØÒ»ÖÂÐԵȣ¬XML½ö½öÊÇչʾÊý¾Ý¡£ÊÂʵÉÏXMLÓëÆäËûÊý¾Ý±íÏÖÐÎʽ×î´óµÄ²»Í¬ÊÇ£ºËû¼«Æä¼òµ¥¡£ÕâÊÇÒ»¸ö¿´ÉÏÈ¥ÓеãËöϸµÄÓŵ㣬µ«ÕýÊÇÕâµãʹXMLÓëÖÚ²»Í¬¡£
¡¡¡¡XMLÓëHTMLµÄÉè¼ÆÇø±ðÊÇ£ºXMLÊÇÓÃÀ´´æ´¢Êý¾ÝµÄ£¬ÖØÔÚÊý¾Ý±¾Éí¡£¶øHTMLÊÇÓÃÀ´¶¨ÒåÊý¾ÝµÄ£¬ÖØÔÚÊý¾ÝµÄÏÔʾģʽ¡£
¡¡¡¡XMLµÄ¼òµ¥Ê¹ÆäÒ×ÓÚÔÚÈκÎÓ¦ÓóÌÐòÖжÁдÊý¾Ý£¬ÕâʹXMLºÜ¿ì³ÉΪÊý¾Ý½»»»µÄΨһ¹«¹²ÓïÑÔ£¬ËäÈ»²»Í¬µÄÓ¦ÓÃÈí¼þÒ²Ö§³ÖÆäËüµÄÊý¾Ý½»»»¸ñʽ£¬µ«²»¾ÃÖ®ºóËûÃǶ¼½«Ö§³ÖXML£¬ÄǾÍÒâζ×ųÌÐò¿ÉÒÔ¸üÈÝÒ×µÄÓëWindows¡¢Mac OS, LinuxÒÔ¼°ÆäËûƽ̨ϲúÉúµÄÐÅÏ¢½áºÏ£¬È»ºó¿ÉÒÔºÜÈÝÒ×¼ÓÔØXMLÊý¾Ýµ½³ÌÐòÖв¢·ÖÎöËû£¬²¢ÒÔXML¸ñʽÊä³ö½á¹û¡£
¡¡¡¡ÎªÁËʹµÃSGMLÏÔµÃÓû§ÓѺã¬XMLÖØж¨ÒåÁËSGMLµÄһЩÄÚ²¿ÖµºÍ²ÎÊý£¬È¥µôÁË´óÁ¿µÄºÜÉÙÓõ½µÄ¹¦ÄÜ£¬ÕâЩ·±ÔӵŦÄÜʹµÃSGMLÔÚÉè¼ÆÍøվʱÏԵø´ÔÓ»¯¡£XML±£ÁôÁËSGMLµÄ½á¹¹»¯¹¦ÄÜ£¬ÕâÑù¾ÍʹµÃÍøÕ¾Éè¼ÆÕß¿ÉÒÔ¶¨Òå×Ô¼ºµÄÎĵµÀàÐÍ£¬XMLͬʱҲÍƳöÒ»ÖÖÐÂÐÍÎĵµÀàÐÍ£¬Ê¹µÃ¿ª·¢ÕßÒ²¿ÉÒÔ²»±Ø¶¨ÒåÎĵµÀàÐÍ¡£
¡¡¡¡ÒòΪXMLÊÇW3CÖƶ¨µÄ£¬XMLµÄ±ê×¼»¯¹¤×÷ÓÉW3CµÄ


Ïà¹ØÎĵµ£º

LINQ to XMLº¯Êý¹¹Ôì·½·¨

±êÇ©£ºÊý¾Ý·ÃÎÊ    LINQ to XML
    LINQ to XML²¢²»´òËãÌæ´ú±ê×¼µÄXML API£¬Ö»ÊDz¹³äÁËÕâЩ±ê×¼XMLÀà      ......

SAXºÍDOM½âÎöXMLÎĵµµÄÇø±ð

ÔÚÕë¶ÔXMLÎĵµµÄÓ¦Óñà³Ì½Ó¿ÚÖУ¬×îÖ÷ÒªµÄÓÐW3CÖƶ¨µÄDOM(Document Object Method£¬Îĵµ¶ÔÏóÄ£ÐÍ)ºÍÓÉDavid MegginsonÁìµ¼µÄSAX(SimpleAPI for XML£¬ÓÃÓÚXMLµÄ¼òµ¥API)[19]¡£
SAXºÍDOMÔÚʵÏÖ¹ý³ÌÖУ¬·Ö±ð²àÖØÓÚ²»Í¬µÄ·½ÃæÒÔÂú×㲻ͬµÄÓ¦ÓÃÐèÇó¡£DOMΪ¿ª·¢»ùÓÚXMLµÄÓ¦ÓÃϵͳÌṩÁ˱ãÀû¡£Ëüͨ¹ýÒ»ÖÖËæ»ú·ÃÎÊ»úÖÆ£¬Ê¹µÃÓ¦ÓÃ³Ì ......

XML ×Ö·ûÎÊÌâ

ÓÃTXT±à¼­ÁËÒ»¸öXMLÎĵµ
<?xml version="1.0" encoding="utf-8"?>
<TEST>"
<Test Value="ÕâÊÇÒ»¸ö²âÊÔ" />
</TEST>
ÓÃIE´ò¿ªµÄʱºòÒ»Ö±ÏÔʾÓдíÎó£¬ÏÔʾººÓï×Ö·û²»Ö§³Ö¡£
¸ÄΪencoding=“gb2312”ºóÏÔʾÕý³£ÁË¡£
µ«Õâ¸ö½á¹ûÓë³õÖÔÎ¥±³£¬ÒòΪUTF-8ÊÇÖ§³ÖËùÓÐÓïÑԵġ£
ºóÀ´²éÕÒÔ­Ò ......

HTMLµ÷ÓÃXMLÊý¾ÝʵÀý

ÎÄÕÂת×Ô¡¾PHP̽·Õß¡¿
XML Ó¦ÓÃÓÚ web ¿ª·¢µÄÐí¶à·½Ã棬³£ÓÃÓÚ¼ò»¯Êý¾ÝµÄ´æ´¢ºÍ¹²Ïí¡£
Èç¹ûÐèÒªÔÚ HTML ÎĵµÖÐÏÔʾ¶¯Ì¬Êý¾Ý£¬ÄÇôÿµ±Êý¾Ý¸Ä±äʱ½«»¨·Ñ´óÁ¿µÄʱ¼äÀ´±à¼­ HTML£¬
XML ¿ÉÒÔ°ÑÊý¾Ý´Ó HTML ÖзÖÀ뿪À´¡£
ͨ¹ý XML£¬Êý¾ÝÄܹ»´æ´¢ÔÚ¶ÀÁ¢µÄ XML ÎļþÖС£ÕâÑùÄã¾Í¿ÉÒÔרעÓÚʹÓà HTML ½øÐв¼¾ÖºÍÏÔʾ£¬²¢È·±£ÐÞ ......

ËÄÑÛ¿´ÊÀ½ç XMLÓï·¨


XML (EXtensible Markup Language)
XML is a
cross-platform, software and hardware independent tool for transmitting
information.
Prolog
XML
Declaration
Processing
Instructions
DOCTYPE
Declaration
Elements
Attributes
XML
Comments
CDATA
Sections
Character
and Entity Refere ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ