本文整理汇总了C++中IXMLDOMNode::get_nodeTypedValue方法的典型用法代码示例。如果您正苦于以下问题:C++ IXMLDOMNode::get_nodeTypedValue方法的具体用法?C++ IXMLDOMNode::get_nodeTypedValue怎么用?C++ IXMLDOMNode::get_nodeTypedValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IXMLDOMNode
的用法示例。
在下文中一共展示了IXMLDOMNode::get_nodeTypedValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vRetrieveConditionSignalValue
/******************************************************************************
Function Name : vRetrieveConditionSignalValue
Input(s) : IXMLDOMNode* pIDOMSChildSignal
CSignalCondition& ouSignalCondition
Output : void
Functionality : Retrieves the Signal Info from the pIDOMSChildSignal
Member of : CVerify_MessageEntity
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 06/04/2011
Modifications :
******************************************************************************/
void CVerify_MessageEntity::vRetrieveConditionSignalValue(IXMLDOMNode* pIDOMSChildSignal, CSignalCondition& ouSignalCondition)
{
CComBSTR bstrNodeName = L"name";
CComVariant NodeValue;
CString omstrTemp;
IXMLDOMNamedNodeMap* pIDOMAttributes;
IXMLDOMNode* pIDOMChildNode;
pIDOMSChildSignal->get_attributes(&pIDOMAttributes);
pIDOMAttributes->getNamedItem(bstrNodeName, &pIDOMChildNode);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
ouSignalCondition.m_omSigName = strCopyBSTRToCString(NodeValue);
pIDOMChildNode->Release();
pIDOMAttributes->Release();
pIDOMSChildSignal->get_nodeTypedValue(&NodeValue);
ouSignalCondition.m_omCondition = strCopyBSTRToCString(NodeValue);
ouSignalCondition.m_omCondition.Remove('\"');
}
示例2: nLoadHeader
/******************************************************************************
Function Name : nLoadHeader
Input(s) : MSXML2::IXMLDOMNodePtr& pHeaderDOMNode
Output : INT
Functionality : Retrieves the Header info
Member of : CTestSetupEntity
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 06/04/2011
Modifications :
Codetag :
******************************************************************************/
INT CTestSetupEntity::nLoadHeader(MSXML2::IXMLDOMNodePtr& pHeaderDOMNode)
{
// CComPtr<IXMLDOMNode> pHeaderDOMNode;
MSXML2::IXMLDOMNodeListPtr pXMLDOMInfoList;
MSXML2::IXMLDOMNodePtr pInfoNode;
MSXML2::IXMLDOMNodePtr pInfoCategoryNode;
MSXML2::IXMLDOMNodePtr pInfoValueNode;
_bstr_t bstrNodeName = "info";
CComVariant NodeValue;
pXMLDOMInfoList = pHeaderDOMNode->selectNodes(bstrNodeName);
LONG lCount = 0;
pXMLDOMInfoList->get_length(&lCount);
SInfo ouTempSInfo;
for(int i = 0; i<lCount; i++)
{
pInfoNode = pXMLDOMInfoList->Getitem(i);
//bstrNodeName = def_STR_CATEGORY_NODE;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_CATEGORY_NODE)));
pInfoCategoryNode = pInfoNode->selectSingleNode(bstrNodeName);
pInfoCategoryNode->get_nodeTypedValue(&NodeValue);
ouTempSInfo.m_omCategory = strCopyBSTRToCString(NodeValue);
pInfoCategoryNode.Release();
//bstrNodeName = def_STR_VALUE_NODE;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_VALUE_NODE)));
pInfoCategoryNode = pInfoNode->selectSingleNode(bstrNodeName);
pInfoCategoryNode->get_nodeTypedValue(&NodeValue);
ouTempSInfo.m_omValue = strCopyBSTRToCString(NodeValue);
pInfoCategoryNode.Release();
pInfoNode.Release();
if(ouTempSInfo.m_omCategory == def_STR_MODULENAME)
{
m_ouTestSetupHeader.m_sModuleName.m_omCategory = ouTempSInfo.m_omCategory;
m_ouTestSetupHeader.m_sModuleName.m_omValue = ouTempSInfo.m_omValue;
}
if(ouTempSInfo.m_omCategory == def_STR_ENGINEERNAME)
{
m_ouTestSetupHeader.m_sEngineerInfo1.m_omCategory = ouTempSInfo.m_omCategory;
m_ouTestSetupHeader.m_sEngineerInfo1.m_omValue = ouTempSInfo.m_omValue;
}
if(ouTempSInfo.m_omCategory == def_STR_ENGINERROLE)
{
m_ouTestSetupHeader.m_sEngineerInfo2.m_omCategory = ouTempSInfo.m_omCategory;
m_ouTestSetupHeader.m_sEngineerInfo2.m_omValue = ouTempSInfo.m_omValue;
}
if(ouTempSInfo.m_omCategory == def_STR_VERSION)
{
m_ouTestSetupHeader.m_sVersion.m_omCategory = ouTempSInfo.m_omCategory;
m_ouTestSetupHeader.m_sVersion.m_omValue = ouTempSInfo.m_omValue;
}
}
//Taking Database
long lCount2 = 0;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_LISTOFDB)));
IXMLDOMNodeListPtr pIDOMSignalList = pHeaderDOMNode->selectNodes(bstrNodeName);
pIDOMSignalList->get_length(&lCount2);
for(INT j = 0; j < lCount2; j++)
{
IXMLDOMNode* pIDOMSChildSignal;
pIDOMSignalList->get_item(j, &pIDOMSChildSignal);
pIDOMSChildSignal->get_nodeTypedValue(&NodeValue);
m_ouTestSetupHeader.m_omDatabasePaths.Add(strCopyBSTRToCString(NodeValue));
//Set The Database Paths
SetDatabaseFile(strCopyBSTRToCString(NodeValue), j+1);
}
// pInfoNode.Release();
//bstrNodeName = def_STR_REPORT_FORMAT;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_REPORT_FORMAT)));
pInfoNode = pHeaderDOMNode->selectSingleNode(bstrNodeName);
pInfoNode->get_nodeTypedValue(&NodeValue);
CString omStrExt;
omStrExt = strCopyBSTRToCString(NodeValue);
pInfoNode.Release();
if(omStrExt == "HTM")
{
m_ouTestSetupHeader.m_sReportFile.m_eType = HTM;
}
//.........这里部分代码省略.........
示例3: GetData
/******************************************************************************
Function Name : GetData
Input(s) : MSXML2::IXMLDOMNodePtr& pIDomNode
Output : HRESULT
Functionality : Fill the datastructure from xml node pIDomNode
Member of : CVerify_MessageEntity
Friend of : -
Author(s) : Venkatanarayana Makam, GT-Derka
Date Created : 06/04/2011
Modifications :
******************************************************************************/
HRESULT CVerify_MessageEntity::GetData(MSXML2::IXMLDOMNodePtr& pIDomNode)
{
IXMLDOMNode* pIDOMChildNode;
LONG lCount;
CComBSTR bstrNodeName;
CComVariant NodeValue;
CString omstrTemp;
CSignalCondition ouSignalCondition;
IXMLDOMNamedNodeMapPtr pIDOMAttributes;
pIDOMAttributes = pIDomNode->Getattributes();// get_attributes((IXMLDOMNamedNodeMap**)&pIDOMAttributes);
//Retrieving Message ID
bstrNodeName = def_STR_TCATTRIB_ID;
pIDOMAttributes->getNamedItem(bstrNodeName, &pIDOMChildNode);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
omstrTemp = strCopyBSTRToCString(NodeValue);
m_ouData.m_dwMessageID = atoi((LPCSTR)omstrTemp);
m_ouData.m_omMessageName = omstrTemp;
if(m_ouDataBaseManager.bIsValidMessageID(m_ouData.m_dwMessageID)== FALSE)
{
//TODO::INVALID MSG POSSIBLE ONLY WHEN THE FILE IS EDITED WITH NOTEPAD.
return -1;
}
pIDOMChildNode->Release();
//Retrieving Message UNIT
bstrNodeName = _(def_STR_TCATTRIB_UNIT);
pIDOMAttributes->getNamedItem(bstrNodeName, &pIDOMChildNode);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
omstrTemp = strCopyBSTRToCString(NodeValue);
if(omstrTemp == "RAW")
{
m_ouData.m_eSignalUnitType = RAW;
}
else // else if(omstrTemp == "ENG")
{
m_ouData.m_eSignalUnitType = ENG;
}
pIDOMChildNode->Release();
//Retrieving Message Channel
bstrNodeName = def_STR_TCATTRIB_CHANNEL;
pIDOMAttributes->getNamedItem(bstrNodeName, &pIDOMChildNode);
m_ouData.m_byChannelNumber = 0; // set default-value for the case, the number is incorrect or the whole argument is missing
if (NULL != pIDOMChildNode) // avoid crash in case XML-file -without channel-information- is loaded
{
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
omstrTemp = strCopyBSTRToCString(NodeValue);
m_ouData.m_byChannelNumber = atoi((LPCSTR)omstrTemp);
pIDOMChildNode->Release();
}
if(m_ouData.m_byChannelNumber == 0) // if casting fails (failure in xml)
{
m_ouData.m_byChannelNumber = 1; // set default channel */
m_lDefaultChannelUsed = 1;
}
//Retrieving Signals and their Data
IFrame* sMsg;
IXMLDOMNodeListPtr pIDOMSignalList;
IXMLDOMNode* pIDOMSChildSignal;
bstrNodeName = _(def_STR_SIGNAL_NODE);
pIDOMSignalList = pIDomNode->selectNodes((_bstr_t)bstrNodeName);
pIDOMSignalList->get_length(&lCount);
INT nRetVal;
nRetVal = m_ouDataBaseManager.nGetMessageName(m_ouData.m_dwMessageID, m_ouData.m_omMessageName);
if(nRetVal != S_OK)
{
return nRetVal;
}
nRetVal = m_ouDataBaseManager.nGetMessageInfo(m_ouData.m_omMessageName, &sMsg);
if ( sMsg == nullptr )
{
return nRetVal;
}
UINT unSignalCount = sMsg->GetSignalCount();
//W4 Removal - Local variable not required
//UINT unTSSignalCount = lCount;
std::map<ISignal*, SignalInstanse> signalList;
sMsg->GetSignalList( signalList);
std::string signalName;
for (auto signal : signalList )
//for(UINT i = 0; i < unSignalCount; i++)
//.........这里部分代码省略.........