Quick Search


Tibetan singing bowl music,sound healing, remove negative energy.

528hz solfreggio music -  Attract Wealth and Abundance, Manifest Money and Increase Luck



 
Your forum announcement here!

  Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums > Free Advertising Forums Directory > Message Boards Directory

Message Boards Directory These are similar to forums, but the posts are listed in chronological order and not by category. They also dont require any registration.

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-02-2011, 04:59 PM   #1
alicetrade1l
Commander In Chief
 
Join Date: Mar 2011
Posts: 2,505
alicetrade1l is on a distinguished road
Default 相似上面的例子里面不属性这些货色

,下面的一个例子是有属性的
  view plaincopy to clipboardprint?
  //UserInfo1.xml xml version="1.0" encoding="UTF-8" ?> <UserInfo> <User UserID="UserID00" UserPwd="UserPwd00" UserLevel="158" /> <User UserID="UserID01" UserPwd="UserPwd01" UserLevel="162" /> <User UserID="UserID02" UserPwd="UserPwd02" UserLevel="165" /> <User UserID="UserID03" UserPwd="UserPwd03" UserLevel="168" /> <User UserID="UserID04" UserPwd="UserPwd04" UserLevel="171" /> <User UserID="UserID05" UserPwd="UserPwd05" UserLevel="175" /> <User UserID="UserID06" UserPwd="UserPwd06" UserLevel="178" /> <User UserID="UserID07" UserPwd="UserPwd07" UserLevel="181" /> <User UserID="UserID08" UserPwd="UserPwd08" UserLevel="184" /> <User UserID="UserID09" UserPwd="UserPwd09" UserLevel="188" /> </UserInfo> //UserInfo1.xml xml version="1.0" encoding="UTF-8" ?> <UserInfo> <User UserID="UserID00" UserPwd="UserPwd00" UserLevel="158" /> <User UserID="UserID01" UserPwd="UserPwd01" UserLevel="162" /> <User UserID="UserID02" UserPwd="UserPwd02" UserLevel="165" /> <User UserID="UserID03" UserPwd="UserPwd03" UserLevel="168" /> <User UserID="UserID04" UserPwd="UserPwd04" UserLevel="171" /> <User UserID="UserID05" UserPwd="UserPwd05" UserLevel="175" /> <User UserID="UserID06" UserPwd="UserPwd06" UserLevel="178" /> <User UserID="UserID07" UserPwd="UserPwd07" UserLevel="181" /> <User UserID="UserID08" UserPwd="UserPwd08" UserLevel="184" /> <User UserID="UserID09" UserPwd="UserPwd09" UserLevel="188" /> </UserInfo> //UserInfo1.xml xml version="1.0" encoding="UTF-8" ?> <UserInfo> <User UserID="UserID00" UserPwd="UserPwd00" UserLevel="158" /> <User UserID="UserID01" UserPwd="UserPwd01" UserLevel="162" /> <User UserID="UserID02" UserPwd="UserPwd02" UserLevel="165" /> <User UserID="UserID03" UserPwd="UserPwd03" UserLevel="168" /> <User UserID="UserID04" UserPwd="UserPwd04" UserLevel="171" /> <User UserID="UserID05" UserPwd="UserPwd05" UserLevel="175" /> <User UserID="UserID06" UserPwd="UserPwd06" UserLevel="178" /> <User UserID="UserID07" UserPwd="UserPwd07" UserLevel="181" /> <User UserID="UserID08" UserPwd="UserPwd08" UserLevel="184" /> <User UserID="UserID09" UserPwd="UserPwd09" UserLevel="188" /> </UserInfo> //UserInfo1.xml xml version="1.0" encoding="UTF-8" ?> <UserInfo> <User UserID="UserID00" UserPwd="UserPwd00" UserLevel="158" /> <User UserID="UserID01" UserPwd="UserPwd01" UserLevel="162" /> <User UserID="UserID02" UserPwd="UserPwd02" UserLevel="165" /> <User UserID="UserID03" UserPwd="UserPwd03" UserLevel="168" /> <User UserID="UserID04" UserPwd="UserPwd04" UserLevel="171" /> <User UserID="UserID05" UserPwd="UserPwd05" UserLevel="175" /> <User UserID="UserID06" UserPwd="UserPwd06" UserLevel="178" /> <User UserID="UserID07" UserPwd="UserPwd07" UserLevel="181" /> <User UserID="UserID08" UserPwd="UserPwd08" UserLevel="184" /> <User UserID="UserID09" UserPwd="UserPwd09" UserLevel="188" /> </UserInfo>
  7. 产生
  view plaincopy to clipboardprint?
  CString strID = _T(""); CString strPwd = _T(""); CMarkup xml; xml.SetDoc("xml version=\"1.0\" encoding=\"UTF-8\"?>"); xml.AddElem("UserInfo"); xml.IntoElem(); for (int i=0; i<10; i++) { //发生一个随机数,作为权限 srand(UINT(time(NULL)+i)); int nLevel = rand()%256; strID.Format("UserID%02d",i); strPwd.Format("UserPwd%02d",i); xml.AddElem("User"); xml.AddAttrib("UserID",strID); xml.AddAttrib("UserPwd",strPwd); xml.AddAttrib("UserLevel",nLevel); } xml.OutOfElem(); xml.Save("UserInfo1.xml"); CString strID = _T(""); CString strPwd = _T(""); CMarkup xml; xml.SetDoc("xml version=\"1.0\" encoding=\"UTF-8\"?>"); xml.AddElem("UserInfo"); xml.IntoElem(); for (int i=0; i<10; i++) { //产生一个随机数,作为权限 srand(UINT(time(NULL)+i)); int nLevel = rand()%256; strID.Format("UserID%02d",i); strPwd.Format("UserPwd%02d",i); xml.AddElem("User"); xml.AddAttrib("UserID",strID); xml.AddAttrib("UserPwd",strPwd); xml.AddAttrib("UserLevel",nLevel); } xml.OutOfElem(); xml.Save("UserInfo1.xml"); CString strID = _T(""); CString strPwd = _T(""); CMarkup xml; xml.SetDoc("xml version=\"1.0\" encoding=\"UTF-8\"?>"); xml.AddElem("UserInfo"); xml.IntoElem(); for (int i=0; i<10; i++) { //产生一个随机数,作为权限 srand(UINT(time(NULL)+i)); int nLevel = rand()%256; strID.Format("UserID%02d",i); strPwd.Format("UserPwd%02d",i); xml.AddElem("User"); xml.AddAttrib("UserID",strID); xml.AddAttrib("UserPwd",strPwd); xml.AddAttrib("UserLevel",nLevel); } xml.OutOfElem(); xml.Save("UserInfo1.xml"); CString strID = _T(""); CString strPwd = _T(""); CMarkup xml; xml.SetDoc("xml version=\"1.0\" encoding=\"UTF-8\"?>"); xml.AddElem("UserInfo"); xml.IntoElem(); for (int i=0; i<10; i++) { //产生一个随机数,作为权限 srand(UINT(time(NULL)+i)); int nLevel = rand()%256; strID.Format("UserID%02d",asics running sneakers,i); strPwd.Format("UserPwd%02d",i); xml.AddElem("User"); xml.AddAttrib("UserID",strID); xml.AddAttrib("UserPwd",strPwd); xml.AddAttrib("UserLevel",nLevel); } xml.OutOfElem(); xml.Save("UserInfo1.xml");
  8. 查找
  view plaincopy to clipboardprint?
  CMarkup xml; BOOL bLoad = false; BOOL bFind = false; bLoad = xml.Load("UserInfo1.xml"); if (bLoad) { CString strID; CString strPwd; xml.ResetMainPos(); xml.FindElem(); //UserInfo while (xml.FindChildElem("User")) { strID = xml.GetChildAttrib("UserID"); strPwd = xml.GetChildAttrib("UserPwd"); TRACE("\n----id:%s,pwd:%s-------\n",glasses armani,strID,strPwd); if (strID=="UserID00"&&strPwd=="UserPwd00") { bFind = true; break; } } } if (bFind) { TRACE("\n---- find------\n"); } else { TRACE("\n----no find------\n"); } CMarkup xml; BOOL bLoad = false; BOOL bFind = false; bLoad = xml.Load("UserInfo1.xml"); if (bLoad) { CString strID; CString strPwd; xml.ResetMainPos(); xml.FindElem(); //UserInfo while (xml.FindChildElem("User")) { strID = xml.GetChildAttrib("UserID"); strPwd = xml.GetChildAttrib("UserPwd"); TRACE("\n----id:%s,pwd:%s-------\n",strID,strPwd); if (strID=="UserID00"&&strPwd=="UserPwd00") { bFind = true; break; } } } if (bFind) { TRACE("\n---- find------\n"); } else { TRACE("\n----no find------\n"); } CMarkup xml; BOOL bLoad = false; BOOL bFind = false; bLoad = xml.Load("UserInfo1.xml"); if (bLoad) { CString strID; CString strPwd; xml.ResetMainPos(); xml.FindElem(); //UserInfo while (xml.FindChildElem("User")) { strID = xml.GetChildAttrib("UserID"); strPwd = xml.GetChildAttrib("UserPwd"); TRACE("\n----id:%s,pwd:%s-------\n",strID,red wing work boot,strPwd); if (strID=="UserID00"&&strPwd=="UserPwd00") { bFind = true; break; } } } if (bFind) { TRACE("\n---- find------\n"); } else { TRACE("\n----no find------\n"); } CMarkup xml; BOOL bLoad = false; BOOL bFind = false; bLoad = xml.Load("UserInfo1.xml"); if (bLoad) { CString strID; CString strPwd; xml.ResetMainPos(); xml.FindElem(); //UserInfo while (xml.FindChildElem("User")) { strID = xml.GetChildAttrib("UserID"); strPwd = xml.GetChildAttrib("UserPwd"); TRACE("\n----id:%s,pwd:%s-------\n",strID,strPwd); if (strID=="UserID00"&&strPwd=="UserPwd00") { bFind = true; break; } } } if (bFind) { TRACE("\n---- find------\n"); } else { TRACE("\n----no find------\n"); }
  9. 修正
  view plaincopy to clipboardprint?
  CMarkup xml; BOOL bLoad = false; BOOL bFind = false; bLoad = xml.Load("UserInfo1.xml"); if (bLoad) { CString strID; CString strPwd; xml.ResetMainPos(); xml.FindElem(); //UserInfo while (xml.FindChildElem("User")) { strID = xml.GetChildAttrib("UserID"); strPwd = xml.GetChildAttrib("UserPwd"); TRACE("\n----id:%s,pwd:%s-------\n",strID,strPwd); if (strID=="UserID00"&&strPwd=="UserPwd00") { bFind = true; xml.SetChildAttrib("UserID",strID+CString("Modify" )); xml.Save("UserInfo1.xml"); break; } } } if (bFind) { TRACE("\n---- find------\n"); } else { TRACE("\n----no find------\n"); } CMarkup xml; BOOL bLoad = false; BOOL bFind = false; bLoad = xml.Load("UserInfo1.xml"); if (bLoad) { CString strID; CString strPwd; xml.ResetMainPos(); xml.FindElem(); //UserInfo while (xml.FindChildElem("User")) { strID = xml.GetChildAttrib("UserID"); strPwd = xml.GetChildAttrib("UserPwd"); TRACE("\n----id:%s,pwd:%s-------\n",strID,strPwd); if (strID=="UserID00"&&strPwd=="UserPwd00") { bFind = true; xml.SetChildAttrib("UserID",new supra,strID+CString("Modify")); xml.Save("UserInfo1.xml"); break; } } } if (bFind) { TRACE("\n---- find------\n"); } else { TRACE("\n----no find------\n"); }
  CMarkup字符集问题
  daubwu posted @ 2008年9月08日 00:54 in VC with tags XML CMarkup , 38 浏览
  CMarkup支撑Unicode,_MBCS宏定义。VS默认设置为MBCS宏定义,未设置该宏时为 UTF-8编码。
  有 MBCS宏定义,且 打开的文件是UTF-8编码:
  CMarkup在Load时将UTF-8转换ANSI编码格局,所以要在读取的处所设置
  view plaincopy to clipboardprint?
  #include <locale.h> setlocale(LC_ALL, ""); #include <locale.h>setlocale(LC_ALL, "");
  不MBCS宏定义,且翻开的文件是UTF-8编码:
  系统默认将文件按UTF-8格式读入体系中,所以显示的时候要手动将数据转换为ANSI格式的进行显示
  view plaincopy to clipboardprint?
  #include <locale.h> setlocale(LC_ALL, ""); strVal = CMarkup::UTF8ToA(strVal); #include <locale.h>setlocale(LC_ALL, "");strVal = CMarkup::UTF8ToA(strVal);
  PS:通过strcpy等拷贝函数能够修改。
alicetrade1l is offline   Reply With Quote

Sponsored Links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 03:55 PM.

 

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum