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

TinyXML(C++ XML½âÎö¿â)

дһ¸öXMLÎļþ TinyXML ÊÇÒ»¸öminiµÄC++ XML½âÎö¿â,ËüÊÇ·ÇÑéÖ¤µÄ,Ëü¿ÉÒÔºÜÈÝÒ׵ļ¯³Éµ½ÆäËûµÄ³ÌÐòÖÐ.Ëü½âÎöÒ»·ÝXML doc,ÒÔ´Ë´´½¨Ò»¸ö¿ÉÒÔ±»¶Á¡¢Ð´£¬±£´æµÄDOM.ËüÖ÷ÒªµÄÀà²ã´Î¼Ü¹¹£¬º¯ÊýÔ­ÐÎÏêϸ˵Ã÷²Î¿´: http://www.grinninglizard.com/tinyxml/index.html
// ÒÔÏÂÒÔ¼òµ¥µÄ³ÌÐòTinyXMLTestΪÀý TinyXMLÖÐ×î¸ù±¾µÄ¾ÍÊÇDocument£¬ËùÒÔÎÞÂÛÊÇÐèҪдһ¸öXMLÎļþ£¬»¹ÊÇÒª¶Á£¬¶¼±ØÐë´ÓÒ»¸öDocument¿ªÊ¼,¾ÍÊÇ(1)µÄ¶¯×÷,ÔÚ´ËûÓиø¹¹Ô캯ÊýÒ»¸ö²ÎÊýÊÇÒòΪÎÒÃǵÄÄ¿µÄÊÇΪÁËд³öÒ»¸öXMLÎļþ£¬ÎļþµÄÃû×Ö¾ÍÊÇ´«¸øTiXmlDocumentµÄ²ÎÊý¡£ÉùÃ÷£¬Îĵµ£¬×¢ÊÍ£¬Îı¾,ÔªËØ£¬²»Ã÷ÀàÐͶ¼ÊÇTinyXmlNodeµÄ×ÓÀ࣬¶¼ÊÇÒ»¸öNode,TinyXmlNodeÊÇÒ»¸öºÜ¸´ÔӵĶ«Î÷£¬ËüÈçÉÏËùʾ:
#include
#include "tinyxml.h"
using namespace std;
int main(int argc, char** argv)
{
// (1) create a XML document
TiXmlDocument *myDoc = new TiXmlDocument();
DocumentÀàÐ͵Ľڵ㽨Á¢ºÃÒԺ󣬾ÍÐèÒª¸ø¸Ã£Ä£Ï£ÍÊ÷½á¹¹Ò»¸ö¸ù,¼´ÏÂÃæµÄ(2),(3),(5),ÓÉÓÚTinyXmlÊÇ·ÇÑéÖ¤µÄ£¬ËùÒÔÀíÂÛÉÏËûÊÇ¿ÉÒÔÓÐÁ½¸öDocumentµÄ£¬£¨ÔÚÄÚ²¿Í¨¹ý¶ÔÀàÐ͵ÄÅжÏÀ´±ÜÃâÕâÒ»Çé¿öµÄ·¢Éú£©,ÓÉÓÚ¸ùÊÇÒ»¸öÔªËØ£¬¶øÔªËر¾ÖÊÉϾÍÊÇÒ»¸öÈÝÆ÷£¬Ëû¿ÉÒÔÓÐ×ÓÔªËØ£¬Îı¾µÈ£¬ÓÉÓÚÊôÐÔ¿ÉÒÔÓжà¸ö£¬ËùÒÔÔÚÄÚ²¿ËüÓÐÒ»¸öTinyXmlAttrbuiteSetµÄ³ÉÔ±£¬ÓÃÒÔ´¢´æÖ®£¬¶øÔÚTinyXmlAttrbuiteSetÖÐËù´æµÄAttrbuitesÊÇͨ¹ý´ø”ÉÚ±ø”µÄÁ´±íÀ´ÊµÏÖ.ÔÚÿ´ÎÁ´½Óʱ£¬¶¼ÊÇ·ÅÖÃÔÚ×îºóÒ»¸öλÖÃ
//(2) create the Root and connect it
TiXmlElement *RootElement = new TiXmlElement("ÈËÔ±×é");
myDoc->LinkEndChild(RootElement);
//(3 )create a person and connect it
TiXmlElement *PersonElement = new TiXmlElement("ÈËÔ±");
RootElement ->LinkEndChild(PersonElement);
Èç(4)Ëùʾ£¬Èç¹ûÒ»¸öÔªËØÓÐÊôÐÔÐèÒªÉèÖã¬Í¨¹ýµ÷ÓÃSetAttribute()·½·¨,¿ÉÒÔʵÏÖÄ¿±ê,ÔÚÉèÖÃʱ£¬»áÔÚElementµÄÄÚ²¿µÄÁ´±íÉÏËÑË÷£¬Èç¹ûÒѾ­ÓÐÏàÓ¦µÄÊôÐÔÃû£¬ÄÇôÊÓ֮Ϊ¸Äд,Èç¹ûûÓÐÔòÌí¼Ó.
//(4) set the attribute fo Person
PersonElement ->SetAttribute("ID", "1");
//(5) create Elementy name && age and connect them
TiXmlElement* NameElement = new TiXmlElement("ÐÕÃû");
TiXmlElement* AgeElement = new TiXmlElement("ÄêÁä");
PersonElement ->LinkEndChild(NameElement);
PersonElement ->


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

XMLÈëÃŵij£¼ûÎÊÌâ(¶þ)

Internet Explorer 5.0 ¶Ô XML ÌṩÄĸö¼¶±ðµÄÖ§³Ö£¿
¡¡¡¡Internet Explorer 5 ÌṩÏÂÁÐ XML Ö§³Ö£º
¡¡¡¡Ö±½Ó²é¿´ XML¡£Microsoft XML ʵÏÖÔÊÐíÓû§Í¨¹ýËûÃÇµÄ Web ä¯ÀÀÆ÷ʹÓà XSL »òÕß²ãµþÑùʽ±í (CSS) ²é¿´ XML£¬¾ÍÏó²é¿´ HTML ÎĵµÒ»Ñù¡£
¡¡¡¡¸ßÐÔÄÜ¡¢ÑéÖ¤ XML ÒýÇæ¡£Internet Explorer 4.0 ¿ª·¢ÈËÔ±ÊìϤµÄ XML ÒýÇ ......

PHP >C++ת»»¹¤¾ß

   ÎãÓ¹ÖÃÒÉ£¬PHPÊÇÒ»Öַdz£°ôµÄ¶¯Ì¬ÍøÒ³ÖÆ×÷ÓïÑÔ£¬ËûºÍCµÄ¼«¸ßÏàËÆÐÔ£¬Ê¹µÃËüµÄÓ﷨ѧÆðÀ´
ºÜÈÝÒ×£¬ËûÓкܶàÀàËÆCÓïÑԿ⺯ÊýµÄ¶«Î÷£¬»¹ÓÐÏñÈÕÆÚ£¬×Ö·û´®ºÍʱ¼äº¯ÊýµÈ£¬ÕâʹµÃËüºÜÈÝ
Ò׿ª·¢Ï൱¸´ÔÓµÄÓ¦ÓóÌÐò¡£
    µ±PHPÓ¦Óõ½¹Ø¼üwebÕ¾µãÉÏ£¬ÈçºÎ±£Ö¤ÖÊÁ¿½«»á±äµÃºÜ¹Ø¼ü¡£È»¶ø£¬PHP²¢²»ÊÇÒ» ......

Sqlserver£º´ÓXMLÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢

ÈçºÎÔÚSqlserverÖдÓÍⲿXMLÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢ÄØ£¿¸ÃÎÊÌâÔ´×ÔÒ»¼ÒÆóÒµµÄ±ÊÊÔÐÅÏ¢ÓиС£
Ò»xmlÎļþÄÚÈÝ£º
<?xml version="1.0" encoding="utf-8"?>
<root>
  <db name="ClientDB1" datasize="512MB" datagrowth="100MB" logsize="100MB" loggrowth ="50MB">
  </db>
  <db ......

ÀûÓÃSocketʵÏÖC++ÓëFlexͨÐÅ


ÀûÓÃSocketʵÏÖC++ÓëFlexͨÐÅ
Ò»¡¢C++·þÎñÆ÷¶Ë
£¨ÓõÄÊÇVisual Studio 2008£¨05£¬03µÄÓ¦¸ÃÒ²¿ÉÒÔ£¬VC++µÄ¿ÉÄÜÐèÒªÉÔ΢¸Ä¶¯£©£©
´úÂëÈçÏ£º
#include <winsock2.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
using namespace std;
#pragma comment(lib,"ws2_32.lib ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ