• LD SDK LDCControlDll 中 CXMLFile的进一步使用方法,建议以后改进


     1、遍历子节点
                    DWORD dRes;
                    if ( 0 == (dRes=xmloper.selectFirstChildNode()) )
                    {
                     // nodetxt = "Programe"
                     while (0==dRes)
                     {
                      CString strProg;
                      xmloper.readNodeValue(strProg);
                      
                      CDocument *pDoc = this->OpenDocumentFile(strProg);
                      dRes = xmloper.selectNextNode();
                     }
                     xmloper.selectParentNode();
                    }
                    
                  2、获取节点ID
                    xmloper.readNodeAttribute(_T("ID"), strID);
                    nScreenID = _ttoi(strID);

                  3、添加子节点属性操作,                   
                  4、在子节点查找,   
                    // !!在一组节点中找到符合条件的节点,并得到他的ID
                    xmloper.selectRootNode();
                    xmloper.selectNode(_T("/Root/ScreenProgrames"), 2);
                    DWORD dRes;
                    if ( 0 == (dRes=xmloper.selectFirstChildNode()) )
                    {
                     // nodetxt = "Programe"
                     while (0==dRes)
                     {
                      CString strProg;
                      xmloper.readNodeValue(strProg);
                      if (0==strProg.Compare(lpszPathName))!!!
                      {
                       xmloper.readNodeAttribute(_T("ID"), strID);
                       nScreenID = _ttoi(strID);
                       break;
                      }
                      
                     ` dRes = xmloper.selectNextNode();
                     }
                     xmloper.selectParentNode();
                    }      

  • 相关阅读:
    oracle 游标例子
    oracle 认识
    Scut游戏服务器引擎之新手入门
    Scut游戏服务器引擎6.5.8.6发布
    Scut游戏服务器引擎之Unity3d接入
    Scut游戏服务器引擎6.1.5.6发布,直接可运行,支持热更新
    ScutSDK 0.9版本发布
    Scut游戏服务器引擎6.0.5.2发布
    Scut游戏服务器引擎6.0.5.1发布
    Scut游戏服务器引擎6.0.5.0发布-支持C#脚本
  • 原文地址:https://www.cnblogs.com/carl2380/p/2317354.html
Copyright © 2020-2023  润新知