xmlдÊý¾Ý - VC/MFC / HTML/XML
ÈçºÎ²ÅÄܽ«Ò»¸ö½á¹¹ÌåÌáÖ±½ÓдÈëXML
typedef struct _Tag_Test
{
char username[MAX_PATH];
char userMessage[MAX_PATH];
}Test;
ÎÒÏëÖ±½Ó°ÑÕâ¸ö½á¹¹Ìåд½øÒ»¸ö½ÚµãÀïÃæ£¬ÎÒÏÖÔÚÓÃTINYXMLдµÄʱºò£¬Ö»ÄÜд³É¹¦usernameµÄ²¿·Ö£¬¶øuserMessage²»ÄÜд³É¹¦¡£²»ÖªµÀÕâ¸öÔõô½â¾ö¡£
ÊDz»ÊÇдÎļþµÄʱºòÓöµ½'\0'¾ÍÖÕֹдÎļþ¡£
memset(XMLfile,0,MAX_PATH);
char filename[MAX_PATH];
memset(filename,0,MAX_PATH);
GetModuleFileName(NULL,filename,MAX_PATH);
CString name ="";
name = filename;
name = name.Left(strlen(name)-17);
name += "Test.xml";
sprintf(filename,name,strlen(name));
TiXmlDocument xmlTest(filename);
xmlTest.Parse(wszLogOrig);
typedef struct _userinfo_
{
char username[MAX_PATH];
char IDNum[MAX_PATH];
}UserInfo,*PUserInfo;
UserInfo user;
char Buf[520];
memset(Buf,0,520);
memset(&user,0,sizeof(UserInfo));
sprintf(user.username,"ccccccc",7);
sprintf(user.IDNum,"123",3);
TiXmlElement bootxml("BOOT");
TiXmlElement bootxml2("BOOT1");
int size = sizeof(UserInfo);
memcpy(Buf,&user,sizeof(UserInfo));
TiXmlText bootte(Buf);
bootxml.InsertEndChild(bootte);
bootxml2.InsertEndChild(bootxml2);
xmlTest.InsertEndChild(bootxml);
xmlTest.InsertEndChild(bootxml2);
xmlTest.SaveFile();
Ð
Ïà¹ØÎÊ´ð£º
ÎÒÓõÄÊÇÁ¬½Ó³Ø×öµÄ£¬ÅäÁ¬½Ó³ØµÄ·½·¨Ó¦¸ÃûÓÐ´í£¬ÎªÊ²¾ÍÊdzöÏÖÕâÖÖÎÊÌâ
javax.servlet.ServletException: javax.naming.NameNotFoundException: No object bound to name java:comp/env/test
ÇëÎÊ´óÏÀÃÇÕâÊÇÔ ......
<?xml version="1.0" encoding="utf-8" ?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......
ÈçÌ⣬ÔÚWINDOWSµ×ϵÄCODE»á£¬µ«ÔÚLINUXϲ»ÖªµÀÈçºÎʵÏÖ£¬JSµÄ´úÂëÓ¦¸ÃÊDz»Ò»ÑùµÄ¡£ Çó½Ì¡£
·Ö²»¹»ÔÙ¼Ó¡£
http://topic.csdn.net/u/20100113/08/17ba1e71-4c33-43f6-91a5-0e031c86e5ed.html
linux ......
ÈçºÎÓÃATL´°ÌåÓ¦ÓóÌÐòÖÐÓÃSystem.Xml±éÀúÒ»¸öXmlÎļþ
Äã˵µÄÊÇÍйܴúÂ룿
¡£
vc¿ÉÓÃmsxml
http://msdn.microsoft.com/en-us/library/ms767594(VS.85).aspx
MSXML4
//ÒýÈëmsxml4.dll &nbs ......
·ÖÒ³µã»÷ÏÂһҳʱ£¬ Ò³Êý»áˢжøÄÚÈݲ»»áˢУ¬Ôõô½â¾ö
Ìù´úÂë
ΪʲôµÚÒ»Ò³ÓÐÄÚÈÝÏÔʾ¶øÒÔºóµÄÿһҳ¶¼Ã»ÓУ¬²¢ÇÒÒ²´ÓÊý¾Ý¿âÖжÁ³öÕâЩÊý¾ÝÁË
1¡£Õâ¸öÎÊÌâºÍCSSûÓйØÏµ
2¡£²»ÖªµÀÄãÊÇÔÚǰ̨·ÖÒ³µÄ»¹ÊÇ ......