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

C++ XML½âÎöÖ®TinyXMLƪ

¡¡±êÇ©£ºXML½âÎö TinyXML¡¡¡¡¡¡[ÍÆË͵½¼¼ÊõȦ]
°æȨÉùÃ÷£ºÔ­´´×÷Æ·£¬ÔÊÐíתÔØ£¬×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ ԭʼ³ö´¦ ¡¢×÷ÕßÐÅÏ¢ºÍ±¾ÉùÃ÷¡£·ñÔò½«×·¾¿·¨ÂÉÔðÈΡ£http://panpan.blog.51cto.com/489034/104961
×î½üʹÓÃTinyXML½øÐÐC++ XML½âÎö£¬¸Ð¾õʹÓÃÆðÀ´±È½Ï¼òµ¥£¬ºÜÈÝÒ×ÉÏÊÖ£¬±¾Îĸø³öÒ»¸öʹÓÃTinyXML½øÐÐXML½âÎöµÄ¼òµ¥Àý×Ó£¬ºÜ¶à¸´ÔÓµÄÓ¦Óö¼¿ÉÒÔ»ùÓÚ±¾Àý×ӵķ½·¨À´Íê³É¡£ÒÔºóµÄÎÄÕÂÀï»á½²½âʹÓÃXerces½øÐÐC++ XML½âÎöµÄÀý×Ó£¬Ï£Íû´ó¼ÒÒ»Æð½»Á÷¡£
TinyXMLÊÇÒ»¸ö¿ªÔ´µÄ½âÎöXMLµÄ½âÎö¿â£¬Äܹ»ÓÃÓÚC++£¬Äܹ»ÔÚWindows»òLinuxÖбàÒë¡£Õâ¸ö½âÎö¿âµÄÄ£ÐÍͨ¹ý½âÎöXMLÎļþ£¬È»ºóÔÚÄÚ´æÖÐÉú³ÉDOMÄ£ÐÍ£¬´Ó¶øÈÃÎÒÃǺܷ½±ãµÄ±éÀúÕâ¿ÃXMLÊ÷¡£
    DOMÄ£Ðͼ´Îĵµ¶ÔÏóÄ£ÐÍ£¬Êǽ«Õû¸öÎĵµ·Ö³É¶à¸öÔªËØ£¨ÈçÊé¡¢Õ¡¢½Ú¡¢¶ÎµÈ£©£¬²¢ÀûÓÃÊ÷Ðͽṹ±íʾÕâЩԪËØÖ®¼äµÄ˳Ðò¹ØϵÒÔ¼°Ç¶Ì×°üº¬¹Øϵ¡£
    Ê×ÏÈ´ÓÍøÉÏÏÂÔØTinyXMLµÄ¿â£¬Îļþ¼ÐµÄÃû×ÖÊÇTinyXpath£¬ÔÚ¹¤³ÌÀï×öÈçÏÂÅäÖãº
    ÔÚ¸½¼Ó°üº¬Â·¾¶ÀïÌí¼Ó£ºÄãµÄtinyxpath·¾¶/tinyxpath/include
    ÔÚ¸½¼Ó¿â·¾¶ÀïÌí¼Ó£ºÄãµÄtinyxpath·¾¶/tinyxpath/lib
    ÔÚ¶ÔÏó/¿â·¾¶ÀïÌí¼Ó£ºtinyxpathd.lib£¬Èç¹ûʹÓÃrelease°æ±¾£¬ÔòÊÇtinyxpath.lib¡£
    ÁíÍ⣬ÓÉÓÚÎÒ¿ª·¢µÄÏîÄ¿ÊǶàÏ̵߳ģ¬ËùÒÔÉèÖÃÁ˶àÏ̵߳Ļ·¾³£¬Òò´ËʹÓÃTinyXMLûÓгöÏÖÎÊÌâ¡£±¾È˽«TinyXMLдÔÚÒ»¸öµ¥¶ÀµÄC++¹¤³Ì½øÐвâÊÔ£¬·¢ÏÖÈç¹û²»ÉèÖöàÏ̵߳Ļ·¾³£¬»á³öÏÖÁ´½Ó´íÎó¡£ÎÒ¾õµÃÔ­Òò¿ÉÄÜÊÇTinyXMLʹÓÃÁ˶àÏ̻߳·¾³£¬Òò´ËÐèÒªÉèÖöàÏ̵߳Ļ·¾³¡£ÔÚ¹¤³Ì/ÉèÖÃϵÄC/C++Ñ¡ÏÖУ¬Ñ¡ÔñCode Generation£¬ÔÚUse run-time libraryÖÐÑ¡ÔñDebug MultiThreaed DLL¼´¿É¡£
    ±¾ÀýµÄXMLÎļþStudents.xmlÈçÏ£º
<Class name="¼ÆËã»úÈí¼þ°à">
    <Students>
        <student name="ÕÅÈý" studentNo="13031001" sex="ÄÐ" age="22">
            <phone>88208888</phone>
            <address>Î÷°²ÊÐÌ«°×ÄÏ·¶þºÅ</address>
        </student>


Ïà¹ØÎĵµ£º

XmlÖÐSelectSingleNode·½·¨ÖеÄxpathÓ÷¨

×î³£¼ûµÄXMLÊý¾ÝÀàÐÍÓУºElement, Attribute£¬Comment, Text.  
 
   Element, Ö¸ÐÎÈç<Name>Tom<Name>µÄ½Úµã¡£Ëü¿ÉÒÔ°üÀ¨£ºElement, Text, Comment, ProcessingInstruction, CDATA, and EntityReference.  
 
   Attribute, Ö¸ÔÚ<Employee >Ö ......

.net ´´½¨xmlµÄÁ½ÖÖ·½·¨


·½·¨Ò»£º°´ÕÕXMLµÄ½á¹¹Ò»²½Ò»²½µÄ¹¹½¨XMLÎĵµ.
    ͨ¹ý.Net FrameWork SDKÖеÄÃüÃû¿Õ¼ä"System.Xml"Öзâ×°µÄ¸÷ÖÖÀàÀ´ÊµÏÖµÄ
·½·¨¶þ£ºÖ±½Ó¶¨Ó°XMLÎĵµ£¬È»ºó±£´æµ½Îļþ¡£
        ͨ¹ý"XmlDocument"ÀàÖеÄ"LoadXml"·½·¨
.aspxǰ̨´úÂë:
<%@ Page Language="C# ......

Óà PHP ¶ÁÈ¡ºÍ±àд XML DOM


Óà PHP ¶ÁÈ¡ºÍ±àд XML DOM
ʹÓà DOM ¿â¡¢SAX ½âÎöÆ÷ºÍÕýÔò±í´ïʽ
ÓÐÐí¶à¼¼Êõ¿ÉÓÃÓÚÓà PHP ¶ÁÈ¡ºÍ±àд XML¡£±¾ÎÄÌṩÁËÈýÖÖ·½·¨¶ÁÈ¡ XML£ºÊ¹Óà DOM ¿â¡¢Ê¹Óà SAX ½âÎöÆ÷ºÍʹÓÃÕýÔò±í´ïʽ¡£»¹½éÉÜÁËʹÓà DOM ºÍ PHP Îı¾Ä£°å±àд XML¡£
Óà PHP ¶ÁÈ¡ºÍ±àд¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¨XML£©¿´ÆðÀ´¿ÉÄÜÓеã¿Ö²À¡£Êµ¼ÊÉÏ£¬XML ºÍËüµÄË ......

¡¾linux¡¿c++ ÄÚ´æ¹ÜÀí£¨¶þ£©

3. Ö¸ÕëÓëÊý×éµÄ±È½Ï
²»Í¬µã£º
      Êý×飺ҪôÔÚ¾ªÌì´æ´¢ÇøÓò±»´´½¨£¨ÈçÈ«¾ÖÊý×飩£¬ÒªÃ´ÔÚÕ»Éϱ»´´½¨¡£Êý×éÃû¶ÔÓ¦×Å£¨¶ø²»ÊÇÖ¸Ïò£©Ò»¿éÄڴ棬ÆäµØÖ·ÓëÈÝÁ¿ÔÚÉúÃüÖÜÆÚÄÚ±£³Ö²»±ä£¬Ö»ÓÐÊý×éµÄÄÚÈÝ¿ÉÒԸı䡣
Ö¸Õ룺¿ÉÒÔËæʱָÏòÈÎÒâÀàÐ͵ÄÄÚ´æ¿é£¬ËüµÄÌØÕ÷ÊÇ“¿É±ä”£¬ËùÒÔÎÒÃdz£Óà ......

Java¶ÁÈ¡xmlµÄËÄÖÖ·½Ê½

¡¡¡¡ÔÚƽʱ¹¤×÷ÖУ¬ÄÑÃâ»áÓöµ½°Ñ XML ×÷ΪÊý¾Ý´æ´¢¸ñʽ¡£Ãæ¶ÔÄ¿Ç°ÖÖÀà·±¶àµÄ½â¾ö·½°¸£¬Äĸö×îÊʺÏÎÒÃÇÄØ£¿ÔÚÕâƪÎÄÕÂÖУ¬ÎÒ¶ÔÕâËÄÖÖÖ÷Á÷·½°¸×öÒ»¸ö²»ÍêÈ«ÆÀ²â£¬½ö½öÕë¶Ô±éÀú XML Õâ¿éÀ´²âÊÔ£¬ÒòΪ±éÀú XML Êǹ¤×÷ÖÐʹÓÃ×î¶àµÄ£¨ÖÁÉÙÎÒÈÏΪ£©¡£
¡¡¡¡Ô¤ ±¸
¡¡¡¡²âÊÔ»·¾³£º
¡¡¡¡AMD ¶¾Áú1.4G OC 1.5G¡¢256M DDR333¡¢Wind ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ