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();
Ð
Ïà¹ØÎÊ´ð£º
ÏÖÔÚÓиöxmlÎļþÊÇ<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
ÔÚ·¢±íÆÀÂÛʱ ¹ýÂË ÈçºÎ£º<br/> <hr/> Ë«ÒýºÅ µ¥ÒýºÅ »¹ÓÐÆäËû µÈ Óкõķ½·¨¸æËßһϠлл
.replace(/<\w+[^>]*>/g,"").replace(/'/g,"''")
½«µ¥ÒýºÅ»»³É2¸ö ......
XMLÎļþÄÚÈÝ£º
- <ResList>
<page>0</page>
- <resItem>
<resName>WWW</resName>
</resItem>
- <resItem>
&nb ......
.css1 .css2 #objid {OVERFLOW: scroll;...}
.css1 .css3 {...}
°Ñ¾ßÓй²Í¬ÑùʽµÄдµ½Ò»ÆðÁË ºÃά»¤
ÖмäÎÞ¶ººÅ£¬ÊôÓÚÑùʽǶÌ×
ÑùʽµÄ¹²Í¬µÄµØ·½Ð´ÔÚÒ»Æ𣬿ÉÒÔÊ¡µô²»±ØÒªµÄ´úÂëÐÐ~
Õâ¸ö¾ÍÊÇ´úÂë ......
XML_PARSER_STRUCT parser;
ret = xml_new_parser(&parser);
xml_register_element_handler(&parser, mmi_pict_read_xml_start_element_login, mmi_pict_read_xml_end_element_lo ......