LD SDK LDCControlDll 中 CXMLFile的进一步使用方法,建议以后改进
2012-01-09 17:33
579 查看
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();
}
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();
}
相关文章推荐
- LD SDK LDCControlDll 中 CXMLFile的进一步使用方法,建议以后改进
- 将MFC Grid control封装为DLL的做法及其在DLL中的使用方法
- 关于 MathMLControl.dll 公式编辑器控件的使用方法
- 将MFC Grid control封装为DLL的做法及其在DLL中的使用方法
- 将MFC Grid control封装为DLL的做法及其在DLL中的使用方法
- 关于 MathMLControl.dll 公式编辑器控件的使用方法
- 将MFC Grid control封装为DLL的做法及其在DLL中的使用方法
- 将MFC Grid control封装为DLL的做法及其在DLL中的使用方法
- 使用PowerBuilder 9编绎DLL类型,有点问题.处理过程记录如下.”Error opening file ‘c:\windows\system32\cgen\en32t.h’”
- ios菜鸟之路:uiscrollview和pagecontrol的使用方法
- DLL创建及使用方法
- CreateFileMapping使用方法
- Qualcomm_Snapdragon_VR_SDK 2.1.1版本简介及使用方法(五)
- Android Studio 使用 SVN 必定遇到问题:commit ** File out of data 问题解决方法
- Altera 建议的使用preset的方法
- DevExpress GridControl使用方法总结
- WebChartControl使用方法
- ASP.NET同时上传多个文件,和不使用HTMLFileInput上传的方法(resource about file upload)
- AjaxControlToolkit的安装使用方法