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

XML Óï·¨¹æÔò


ת×Ô£ºhttp://www.w3school.com.cn/xml/xml_syntax.asp
XML µÄÓï·¨¹æÔòºÜ¼òµ¥£¬ÇÒºÜÓÐÂß¼­¡£ÕâЩ¹æÔòºÜÈÝÒ×ѧϰ£¬Ò²ºÜÈÝÒ×ʹÓá£
ËùÓÐ XML ÔªËض¼ÐëÓйرձêÇ©
ÔÚ HTML£¬¾­³£»á¿´µ½Ã»ÓйرձêÇ©µÄÔªËØ£º
<p>This is a paragraph
<p>This is another paragraph
ÔÚ XML ÖУ¬Ê¡ÂԹرձêÇ©ÊÇ·Ç·¨µÄ¡£ËùÓÐÔªËض¼±ØÐëÓйرձêÇ©£º
<p>This is a paragraph</p>
<p>This is another paragraph</p>
×¢ÊÍ£ºÄúÒ²ÐíÒѾ­×¢Òâµ½ XML ÉùÃ÷ûÓйرձêÇ©¡£Õâ²»ÊÇ´íÎó¡£ÉùÃ÷²»ÊôÓÚXML±¾ÉíµÄ×é³É²¿·Ö¡£Ëü²»ÊÇ XML ÔªËØ£¬Ò²²»ÐèÒª¹Ø±Õ±êÇ©¡£
XML ±êÇ©¶Ô´óСдÃô¸Ð
XML ÔªËØʹÓà XML ±êÇ©½øÐж¨Òå¡£
XML ±êÇ©¶Ô´óСдÃô¸Ð¡£ÔÚ XML ÖУ¬±êÇ© <Letter> Óë±êÇ© <letter> ÊDz»Í¬µÄ¡£
±ØÐëʹÓÃÏàͬµÄ´óСдÀ´±àд´ò¿ª±êÇ©ºÍ¹Ø±Õ±êÇ©£º
<Message>ÕâÊÇ´íÎóµÄ¡£</message>
<message>ÕâÊÇÕýÈ·µÄ¡£</message>
×¢ÊÍ£º´ò¿ª±êÇ©ºÍ¹Ø±Õ±êǩͨ³£±»³ÆΪ¿ªÊ¼±êÇ©ºÍ½áÊø±êÇ©¡£²»ÂÛÄúϲ»¶ÄÄÖÖÊõÓËüÃǵĸÅÄÊÇÏàͬµÄ¡£
XML ±ØÐëÕýÈ·µØǶÌ×
ÔÚ HTML ÖУ¬³£»á¿´µ½Ã»ÓÐÕýȷǶÌ×µÄÔªËØ£º
<b><i>This text is bold and italic</b></i>
ÔÚ XML ÖУ¬ËùÓÐÔªËض¼±ØÐë±Ë´ËÕýÈ·µØǶÌ×£º
<b><i>This text is bold and italic</i></b>
ÔÚÉÏÀýÖУ¬ÕýȷǶÌ×µÄÒâ˼ÊÇ£ºÓÉÓÚ <i> ÔªËØÊÇÔÚ <b> ÔªËØÄÚ´ò¿ªµÄ£¬ÄÇôËü±ØÐëÔÚ <b> ÔªËØÄڹرա£
XML Îĵµ±ØÐëÓиùÔªËØ
XML Îĵµ±ØÐëÓÐÒ»¸öÔªËØÊÇËùÓÐÆäËûÔªËصĸ¸ÔªËØ¡£¸ÃÔªËسÆΪ¸ùÔªËØ¡£
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
XML µÄÊôÐÔÖµÐë¼ÓÒýºÅ
Óë HTML ÀàËÆ£¬XML Ò²¿ÉÓµÓÐÊôÐÔ£¨Ãû³Æ/ÖµµÄ¶Ô£©¡£
ÔÚ XML ÖУ¬XML µÄÊôÐÔÖµÐë¼ÓÒýºÅ¡£ÇëÑо¿ÏÂÃæµÄÁ½¸ö XML Îĵµ¡£µÚÒ»¸öÊÇ´íÎóµÄ£¬µÚ¶þ¸öÊÇÕýÈ·µÄ£º
<note date=08/08/2008>
<to>George</to>
<from>John</from>
</note>
<note date="08/08/2008">
<to>George</to>
<from>John</from>
</note>
ÔÚµÚÒ»¸öÎĵµÖеĴíÎóÊÇ£¬note ÔªËØÖÐµÄ date ÊôÐÔûÓмÓÒýºÅ¡£
ʵÌåÒýÓÃ
ÔÚ XML ÖУ¬Ò»Ð©×Ö·ûÓµÓÐÌØÊâµÄÒâÒå¡£
Èç¹ûÄã°Ñ×Ö·û "<" ·ÅÔÚ XML ÔªËØÖУ¬»á·¢Éú´íÎó£¬Õâ


Ïà¹ØÎĵµ£º

zzOPENCV XMLº¯ÊýÍêÃÀÖ§³ÖÖÐÎÄ·½·¨

           
XML¼´extensibe markup languageµÄËõд£¬Ò²¾ÍÊÇ¿ÉÀ©Õ¹±êʶÓïÑÔ¡£ÓÉÓÚÆ俪·ÅÐÔ£¬Ô½À´Ô½¶àµÄÈí¼þ²ÉÓÃËü×÷ΪÃèÊöÓïÑÔ£»ÓÉÓÚÆäƽ̨ÎÞ¹ØÐÔ£¬Ô½À´Ô½¶àµÄϵͳ²ÉÓÃËü×÷ΪÊý¾Ý´«µÝÖн顣¼ÆËã»úÐÐÒµÒѾ­°ÑXMLΪÊý¾Ý½»»»µÄ±ê×¼£¬²¢ÌṩÁËÏ൱ÊýÁ¿µÄÖ§³Ö¹¤¾ß¡£µ« ......

ÀûÓÃVC++ʵÏÖ¶ÔXML½áµãµÄ¸üкÍ×·¼Ó

ʵÏÖ¹¦ÄÜ£º¸ù¾ÝÅäÖÃÎļþ£¨XXXX.ini£©ÖеÄÄÚÈݶÔXMLÖнڵã½øÐвÙ×÷£¬Èç¹ûXMLÖдæÔÚÓëÅäÖÃÎļþÖÐÏàͬµÄ½Úµã£¬Ôò¸ù¾ÝÅäÖÃÎļþ½«XMLÎļþÖÐÏàÓ¦½ÚµãµÄÖµ½øÐиüУ»Èç¹ûXMLÎļþÖв»´æÔÚÅäÖÃÎļþÖгöÏֵĽڵ㣬ÔòÔÚXMLÖн«Ð½ڵ㼰ֵ½øÐвåÈë²Ù×÷¡£
¡ôXMLÎĵµ½á¹¹ÈçÏÂ
//------------------------------------------------------ ......

Ajax ²Ù×÷XMLµÄºÃʵÀý

¡¡¡¡ÔÚÉÏһƪÎÄÕÂÖУ¬ÎÒÃÇÌÖÂÛÁËÈçºÎͨ¹ýjavascript´ÓÒ»¸öÔ¶³ÌXMLÎļþÖÐÈ¡µÃÊý¾Ý¡£ÔÚÕâƪÎÄÕÂÖУ¬ÎÒÃǽ«Ñ§»áÔõÑù¶ÔÊý¾Ý×÷¸ü¸´ÔӵĴ¦Àí¡£×÷Ϊһ¸öʾÀý£¬ÎÒÃÇ»á×¼±¸Ò»×éXMLÊý¾Ý£¬½«Êý¾Ý·Ö¸î³É¶ÀÁ¢µÄƬ¶Ï²¢ÒÔ²»Í¬µÄ·½Ê½Õ¹Ê¾ÕâЩƬ¶Ï£¨È¡¾öÓÚËüÃÇÊÇÈçºÎ±»±êʶµÄ£©¡£
¡¡¡¡ÕâƪÎÄÕÂÊǽ¨Á¢ÔÚÉÏһƪÎÄÕÂÖй¹ÔìµÄʾÀý´úÂëµÄ»ù´¡Ö®ÉÏ ......

libxml¿â½âÎöXMLÎļþ

Ð÷ÂÛ
LibxmlÊÇÒ»¸öÓÐÃâ·ÑÐí¿ÉµÄÓÃÓÚ´¦ÀíXML¡¢¿ÉÒÔÇáËÉ¿çÔ½¶à¸öƽ̨µÄCÓïÑÔ¿â¡£LibxmlʵÏÖÁ˶Á¡¢´´½¨¼°²Ù×ÝXMLÊý¾Ý¹¦ÄÜ¡£
Õâ¸öÖ¸ÄÏ»ùÓÚÒ»¸ö¼òµ¥µÄXMLÓ¦Óá£
Êý¾ÝÀàÐÍ
Libxml ¶¨ÒåÁËÐí¶àÊý¾ÝÀàÐÍ£¬ËüÒþ²ØÁËÔÓÂÒµÄÀ´Ô´ÒÔÖÂÄã²»±Ø´¦ÀíËü³ý·ÇÄãÓÐÌض¨µÄÐèÒª¡£xmlChar Ìæ´úchar,ʹÓÃUTF-8±àÂëµÄÒ»×Ö½Ú×Ö·û´®¡£Èç¹ûÄãµÄÊ ......

XMLÈ¡½ÚµãÃû³ÆÓë½ÚµãֵʵÀý

declare @x xml
set @x='
<ROOT>
  <SM>
  <SMID>88</SMID>
  <SMCD>A5</SMCD>
  <SMNM>ÁõÑó</SMNM>
  <NDS>
  <ND>
  <SF>3</SF>
  <NDID>88</NDID>
  <NDCD>A5< ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ