ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: XML :: XML ½éÉÜ

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

XML
XML DHTMLÐÐΪ
XML Ïà¹Ø¼¼Êõ
XML ±à¼­Æ÷
XML ÕªÒª
XML ʵÀý
XML×Ö·û±àÂë
xml ÎĵµÊ÷
IEºÍ»ðºü¶ÁÈ¡XML·..

XML ½éÉÜ


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-29 ÐÞ¸Ä:2008-04-05 ä¯ÀÀ:9305 :: ::

XML was designed to describe data and to focus on what data is.
XMLÓÃÓÚÃèÊöÊý¾Ý£¬²àÖØÓÚÊý¾Ý±¾Éí£¨È磺Êý¾ÝÀàÐͺÍÊý¾Ý½á¹¹£©µÄ¶¨Òå¡£

HTML was designed to display data and to focus on how data looks.
HTMLÓÃÓÚÏÔʾÊý¾Ý£¬²àÖØÓÚÊý¾ÝµÄÏÔʾÐÎʽ¡£


What You Should Already Know
ÄãÓ¦¾ß±¸µÄ֪ʶ

Before you continue you should have a basic understanding of the following:
ÔÚ¼ÌÐøÏÂÃæµÄѧϰǰ£¬Äã±ØÐë¶ÔÒÔÏÂÄÚÈÝÓлù±¾ÈÏʶ:

  • HTML / XHTML
  • JavaScript »ò VBScript

If you want to study these subjects first, find the tutorials on our Home page.
Èç¹ûÄãÏëÏÈѧϰÉÏÊöÄÚÈÝ£¬Çë²ÎÕÕ֪ʶ¿âµÄ½Ì³Ì¡£


What is XML?
ʲôÊÇXML£¿

  • XML stands for EXtensible Markup Language
    XML´ú±íEXtensible Markup Language£¨¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£©
  • XML is a markup language much like HTML
    XMLÊÇÒ»ÖÖ±ê¼ÇÓïÑÔ£¬ÕâµãÓëHTML·Ç³£ÏàËÆ
  • XML was designed to describe data
    XMLÊÇÓÃÓÚÃèÊöÊý¾ÝµÄ
  • XML tags are not predefined. You must define your own tags
    XML±êÇ©²»ÏñHTMLÄÇÑù£¬ÊÇÔ¤Ïȶ¨ÒåºÃµÄ£¬Äã±ØÐ붨Òå×Ô¼ºÉ趨µÄ±êÇ©
  • XML uses a Document Type Definition (DTD) or an XML Schema to describe the data
    XMLʹÓÃDTD£¨Document Type Definition£ºÎĵµÀàÐÍÃèÊö£©»òXMLSchemaÀ´ÃèÊöÊý¾Ý
  • XML with a DTD or XML Schema is designed to be self-descriptive
    ´øÓÐDTD»òXMLSchemaµÄXML¾ßÓГ×ÔÎÒÃèÊö”µÄÌØµã¡£
  • XML is a W3C Recommendation
    XMLÊÇW3CÍÆ¼öʹÓõıê×¼

XML is a W3C Recommendation
XMLÊÇW3CÍÆ¼öʹÓõıê×¼

The Extensible Markup Language (XML) became a W3C Recommendation 10. February 1998.
1998Äê2ÔÂ10ÈÕ£¬À©Õ¹±ê¼ÇÓïÑÔ(XML)³ÉΪW3CÍÆ¼öʹÓõıê×¼¡£

You can read more about XML standards in our W3C tutorial.
ÔÚW3C½Ì³ÌÖÐÄãÄÜ¿´µ½¸ü¶à¹ØÓÚXMLµÄ±ê×¼¡£


The Main Difference Between XML and HTML
XMLºÍHTMLµÄÖ÷Òª²î±ð

XML was designed to carry data
XMLÓÃÓÚ³ÐÔØÊý¾Ý

XML is not a replacement for HTML
XML²¢²»ÄÜ×÷ΪHTMLµÄÌæ´úÆ·

XML and HTML were designed with different goals
XMLºÍHTML¶¨ÒåµÄÄ¿µÄÊDz»Í¬µÄ

XML was designed to describe data and to focus on what data is
XMLÓÃÓÚÃèÊöÊý¾Ý£¬²àÖØÓÚÊý¾Ý±¾Éí£¨È磺Êý¾ÝÀàÐͺÍÊý¾Ý½á¹¹£©µÄ¶¨Òå

HTML was designed to display data and to focus on how data looks
HTMLÓÃÓÚÏÔʾÊý¾Ý£¬²àÖØÓÚÊý¾ÝµÄÏÔʾÐÎʽ

HTML is about displaying information, while XML is about describing information
HTML²àÖØÓÚÏÔʾÐÅÏ¢£¬¶øXMLÔò²àÖØÓÚÃèÊöÐÅÏ¢ 


XML Does not DO Anything
XMLÊÇ“²»¸ÉÈκÎÊÂÇéµÄ”

XML was not designed to DO anything.
XMLÊDz»ÓÃÓÚ“¸ÉÊ”µÄ¡£

Maybe it is a little hard to understand, but XML does not DO anything. XML was created to structure, store and to send information.
¿ÉÄÜÕâô½âÊÍXMLÓеãÄÑÒÔÀí½â£¬µ«XMLȷʵ²»¸ÉÈκÎÊ£»XMLÖ»ÊÇÓÃÀ´¼Ü¹¹ÐÅÏ¢¡¢´¢´æÐÅÏ¢ÒÔ¼°·¢ËÍÐÅÏ¢µÄ¡£

The following example is a note to Tove from Jani, stored as XML:
ÏÂÃæµÄÀý×ÓÊÇÒÔXMLÐÎʽÊéдµÄÒ»ÕÅ Jani  ¸ø Tove µÄ±ãÌõ£º

<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>

<body>Don't forget me this weekend!</body>
</note>

The note has a header and a message body. It also has sender and receiver information. But still, this XML document does not DO anything. It is just pure information wrapped in XML tags. Someone must write a piece of software to send, receive or display it.
Õâ·Ý±ãÌõ°üº¬Á˱êÌâºÍÐÅÏ¢Ö÷Ì壬»¹°üº¬ÐÅÏ¢·¢ËÍÕߺͽÓÊÜÕßµÄÏà¹ØÐÅÏ¢¡£µ«ÔÚÕâÀÎÒÃÇ»¹ÊÇҪǿµ÷µÄÊÇ£ºXMLÎļþ²¢Î´×÷Èκδ¦Àí¡£ËüÖ»Êǽ«ÐÅϢǶÌ×ÔÚXML±êÇ©Àï¡£±ðÈ˱ØÐëÊéдһ¸öÖ¸Áî²ÅÄÜ·¢ËÍ¡¢½ÓÊÜ»òÏÔʾËü¡£ 


XML is Free and Extensible
XMLÊÇÃâ·ÑµÄ¿É×ÔÓÉÀ©Õ¹µÄ 

XML tags are not predefined. You must "invent" your own tags.
XML±êÇ©²»ÊÇÔ¤Ïȶ¨ÒåµÄ£¬Äã±ØÐëµÃ×Ô¼º“´´Ôì”±êÇ©¡£

The tags used to mark up HTML documents and the structure of HTML documents are predefined. The author of HTML documents can only use tags that are defined in the HTML standard (like <p>, <h1>, etc.).
ÓÃÓÚ±ê¼ÇHTMLÎĵµºÍHTMLÎĵµ½á¹¹µÄ±êÇ©ÊÇÔ¤Ïȶ¨ÒåºÃµÄ£¬HTMLÎĵµµÄÎĵµ×÷ÕßÖ»ÄÜʹÓÃHTMLÖÐÔ¤Ïȶ¨ÒåºÃµÄ±êÇ©¶ÔÎĵµ½øÐб༭£¨Ïñ<p>, <h1>,µÈµÈ£©¡£

XML allows the author to define his own tags and his own document structure.
XMLÔÊÐí±àÕß×Ô¶¨Òå±êÇ©ºÍÎĵµ½á¹¹¡£

The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document.
ÉÏÊöÀý×ÓÖÐʹÓõıêÇ©£¨Èç <to> ºÍ <from>£©²¢Î´ÔÚÈκÎXML±ê×¼Öж¨Ò壬ÕâЩ±êÇ©ÊÇXMLÎĵµ×÷Õß×Ô¼º“´´Ô씵ġ£


XML is a Complement to HTML
XMLÊÇHTMLµÄ²¹³ä

XML is not a replacement for HTML
XML²»Äܵ±×÷HTMLµÄÌæ´úÆ·¡£

It is important to understand that XML is not a replacement for HTML. In future Web development it is most likely that XML will be used to describe the data, while HTML will be used to format and display the same data.
ÕâÀïÓÐÒ»µã·Ç³£ÖØÒª£ºXML²»ÊÇHTMLµÄÌæ´úÆ·¡£¼´Ê¹ÔÚ½«À´µÄ»¥ÁªÍøÖУ¬XMLÒ²ºÜ¿ÉÄÜÖ»ÓÃÓÚ¶¨ÒåÊý¾Ý£¬¶øHTMLÔòÓÃÓÚ¸ñʽ»¯Êý¾ÝºÍÏÔʾÊý¾Ý¡£

My best description of XML is this: XML is a cross-platform, software and hardware independent tool for transmitting information.
ÎÒÃǶÔXML×îºÃµÄ½âÊÍÊÇ£ºXMLÊÇ¿çÆ½Ì¨µÄ£¬ËüÊÇÒ»ÖÖ¶ÀÁ¢ÓÚÈíÓ²¼þµÄÊý¾Ý´«Ê乤¾ß¡£


XML in Future Web Development
XMLÔÚδÀ´ÍøÂçÖеķ¢Õ¹

XML is going to be everywhere
XML·¢Õ¹µ½ºóÃæ½«»áËæ´¦¿É¼û¡£

We have been participating in XML development since its creation. It has been amazing to see how quickly the XML standard has been developed and how quickly a large number of software vendors have adopted the standard.
×ÔXMLµ®ÉúÒÔÀ´£¬ÎÒÃǾÍÒѾ­²ÎÓëµ½ËüµÄ·¢Õ¹¹ý³ÌÖ®ÖС£ÁîÈËÄÑÒÔÏëÏóµÄÊÇ£ºXML±ê×¼µÄ·¢Õ¹ÊÇÈç´ËѸËÙ£¬²¢ºÜ¿ì±»´óÅúµÄÈí¼þÉÌËù½ÓÄɺÍʹÓá£

We strongly believe that XML will be as important to the future of the Web as HTML has been to the foundation of the Web and that XML will be the most common tool for all data manipulation and data transmission.
ÎÒÃǼáÐÅ£¬XML¶ÔδÀ´ÍøÂçµÄÖØÒªÐÔ¾ö²»ÑÇÓÚµ±³õHTML¶ÔÍøÂç¼Ü¹¹µÄÖØÒªÐÔ£»²¢ÇÒ£¬XML½«³ÉΪÊý¾Ý´¦ÀíºÍÊý¾Ý´«ÊäÖÐ×îÆÕ±éʹÓõŤ¾ß¡£ 


XML Joke
¹ØÓÚXMLµÄЦ»° 

Question: When should I use XML?
ÎÊ£ºÎÒ¸ÃʲôʱºòʹÓÃXMLÄØ?

Answer: When you need a buzzword in your resume.
´ð£ºµ±ÄãÏëÔÚÂÄÀú±íÖÐÇ¿µ÷ijЩ´ÊµÄʱºò¡£

ÆÀÂÛ (3) 1 All