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Êý¾ÝÀàÐÍÓУºElement, Attribute£¬Comment, Text.
Element, Ö¸ÐÎÈç<Name>Tom<Name>µÄ½Úµã¡£Ëü¿ÉÒÔ°üÀ¨£ºElement, Text, Comment, ProcessingInstruction, CDATA, and EntityReference.
Attribute, Ö¸ÔÚ<Employee >Ö ......
ÔÚXMLÊý¾ÝÖУ¬Ò»Ð©ÌØÊâ×Ö·û±ØÐëÓÃתÒå·ûºÅÀ´´úÌ棬¶ø»Ø³µ»»ÐÐ×Ö·û¾ÍÊÇÊôÓÚÌØÊâ·ûºÅ¡£
¿Õ¸ñ ( )
Tab (	)
»Ø³µ (
)
»»ÐÐ (
)
ÏÂÃæÊÇÒ»¸ö±¨±íXMLÊý¾Ý£¬ÀïÃæ°üÀ¨Óлسµ»»ÐÐ×Ö·û£º
<report>
<NewDataSet>
<Table>
<CustomerID>BLONP</CustomerID& ......
WebService£¬¼òµ¥Ò»µã˵£¬¾ÍÊǸö¶ÔÍâµÄ½Ó¿Ú,ÀïÃæÓк¯Êý¿É¹©Íⲿ¿Í»§µ÷ÓÃ(×¢Òâ:ÀïÃæͬÑùÓпͻ§²»¿Éµ÷Óõĺ¯Êý).¼ÙÈôÎÒÃÇÊÇ·þÎñ¶Ë,ÎÒÃÇдºÃÁ˸öwebservice,È»ºó°ÑËü¸øÁË¿Í»§(ͬʱÎÒÃǸøÁËËûÃǵ÷ÓùæÔò),¿Í»§¾Í¿ÉÒÔÔÚ´Ó·þÎñ¶Ë»ñÈ¡ÐÅϢʱ´¦ÓÚÒ»¸öÏà¶Ô͸Ã÷µÄ״̬.¼´ÊÇ¿Í»§²»Á˽â(Ò²²»ÐèÒª)Æä¹ý³Ì,ËûÃÇÖ»»ñÈ¡Êý¾Ý. Webservice´«µ ......
C/C++ development with the Eclipse Platform
Pawel Leszek
ÕªÒª:ͨ¹ý±¾ÎÄÄ㽫»ñµÃÈçºÎÔÚEclipseƽ̨ÉÏ¿ª·¢C/C++ÏîÄ¿µÄ×ÜÌåÈÏʶ¡£ËäÈ»EclipseÖ÷Òª±»ÓÃÀ´¿ª·¢JavaÏîÄ¿£¬µ«ËüµÄ¿ò¼ÜʹµÃËüºÜÈÝÒ×ʵÏÖ¶ÔÆäËû¿ª·¢ÓïÑÔµÄÖ§³Ö¡£ÔÚÕâƪÎÄÕÂÀÄ㽫ѧ»áÈçºÎʹÓÃCDT(C/C++ Development Toolkit)£¬Ò»¸öÔÚEclipseƽ̨ÉÏ×î ......
ÔÚƽʱ¹¤×÷ÖУ¬ÄÑÃâ»áÓöµ½°ÑXML×÷ΪÊý¾Ý´æ´¢¸ñʽ¡£Ãæ¶ÔÄ¿Ç°ÖÖÀà·±¶àµÄ½â¾ö·½°¸£¬Äĸö×îÊʺÏÎÒÃÇÄØ£¿ÔÚÕâƪÎÄÕÂÖУ¬ÎÒ¶ÔÕâËÄÖÖÖ÷Á÷·½°¸×öÒ»¸ö²»ÍêÈ«ÆÀ²â£¬½ö½öÕë¶Ô±éÀúXMLÕâ¿éÀ´²âÊÔ£¬ÒòΪ±éÀúXMLÊǹ¤×÷ÖÐʹÓÃ×î¶àµÄ(ÖÁÉÙÎÒÈÏΪ)¡£
¡¡¡¡Ô¤±¸
¡¡¡¡²âÊÔ»·¾³£º
¡¡¡¡AMD¶¾Áú1.4G OC 1.5G¡¢256M DDR333¡¢Windows2000 Server SP ......