本文整理汇总了C++中msxml2::IXMLDOMNode::get_nodeTypedValue方法的典型用法代码示例。如果您正苦于以下问题:C++ IXMLDOMNode::get_nodeTypedValue方法的具体用法?C++ IXMLDOMNode::get_nodeTypedValue怎么用?C++ IXMLDOMNode::get_nodeTypedValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类msxml2::IXMLDOMNode
的用法示例。
在下文中一共展示了IXMLDOMNode::get_nodeTypedValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WebServer_LoadDB_PatrolDeviceInfo
//通过WebService查询在巡防的终端信息,当终端发来GPS数据时,用来判断该终端是否在巡防,
//如果是还要将该GPS数据发给巡防管理服务
BOOL CDBManage_WebServer::WebServer_LoadDB_PatrolDeviceInfo(BOOL isUpdateOnLineDeviceList)
{
BOOL bRet = FALSE;
if (!gPGisMainCtrlProc.m_BusinessManage_ConnectToGPSCheckServer.m_PatrolDevListData.IsEmpty())
{
gPGisMainCtrlProc.m_BusinessManage_ConnectToGPSCheckServer.m_PatrolDevListData.ClearAll();
}
if(m_bWebServiceConn)
{
MSXML2::IXMLDOMDocumentPtr pDoc;
HRESULT hr;
hr=pDoc.CreateInstance(__uuidof(MSXML2::DOMDocument));
if(FAILED(hr))
{
gWriteLogApp.WriteLog( FOR_ALARM,_T("%s [SYS] 无法创建DOMDocument对象,请检查是否安装了MS XML Parser 运行库\n"),CTime::GetCurrentTime().Format("%H:%M:%S"));
return FALSE;
}
CComBSTR hiResult;
m_pWebService->HYTPGIS_PatroAreaUser_QueryAllDevice(&hiResult);
char *pStr = NULL;
pStr = _com_util::ConvertBSTRToString(hiResult);
CString strXML;
strXML.Format("<?xml version=\"1.0\" encoding=\"utf-8\" ?><DataSet xmlns=\"http://tempuri.org/\"> %s</DataSet>",pStr);
VARIANT_BOOL bRet = pDoc->loadXML((_bstr_t)strXML);
if(bRet == -1)
{
MSXML2::IXMLDOMNodeListPtr pListNode;
pListNode = pDoc->selectNodes("//Table");
if(pListNode != NULL)
{
int i;
long tLen;
pListNode->get_length(&tLen);
CString strTemp;
for(i = 0 ; i < tLen; i++)
{
int j = 0;
MSXML2::IXMLDOMNode *pTempNode;
pListNode->get_item(i,&pTempNode);
MSXML2::IXMLDOMNodeList *TempChildList;
pTempNode->get_childNodes(&TempChildList);
long listCount = 0;
TempChildList->get_length(&listCount);
MSXML2::IXMLDOMNode *tempListItem = NULL;
_variant_t tempValue;
for(j = 0 ; j < listCount; j++)
{
TempChildList->get_item(j,&tempListItem);
tempListItem->get_nodeTypedValue(&tempValue);
strTemp.Format("%s",(char *)(_bstr_t)tempValue);
strTemp = strTemp.TrimLeft();
strTemp = strTemp.TrimRight();
gPGisMainCtrlProc.m_BusinessManage_ConnectToGPSCheckServer.m_PatrolDevListData.AddItem(strTemp);
if(isUpdateOnLineDeviceList) //当巡防路线修改时为TRUE,此时要更新在线终端的巡防状态字段
{
gPGisMainCtrlProc.m_BusinessManage_ConToPub.Update_OnlineDeviceList_PatrolState(strTemp); //
}
TRACE("添加巡防用户信息 %s \n",strTemp);
}
} //end for(i = 0
bRet = TRUE;
gWriteLogApp.WriteLog( FOR_ALARM,_T("%s [SYS] 加载巡防终端信息 %d 成功 \n"),CTime::GetCurrentTime().Format("%H:%M:%S"),tLen);
m_bWebConnOK = TRUE;
}
}
if(pStr)
{
delete []pStr;
pStr = NULL;
}
}
return bRet;
}