本文整理汇总了C++中msxml2::IXMLDOMNodePtr::get_nodeTypedValue方法的典型用法代码示例。如果您正苦于以下问题:C++ IXMLDOMNodePtr::get_nodeTypedValue方法的具体用法?C++ IXMLDOMNodePtr::get_nodeTypedValue怎么用?C++ IXMLDOMNodePtr::get_nodeTypedValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类msxml2::IXMLDOMNodePtr
的用法示例。
在下文中一共展示了IXMLDOMNodePtr::get_nodeTypedValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nParseTSFile
/******************************************************************************
Function Name : nParseTSFile
Input(s) : CString omstrTSFile
Output : INT
Functionality : Load the omStrTSFille
Member of : CTestSetupEntity
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 06/04/2011
Modifications :
Codetag : CS002
******************************************************************************/
INT CTestSetupEntity::nParseTSFile(CString omstrTSFile)
{
MSXML2::IXMLDOMDocumentPtr pIDOMDoc;
HRESULT hr = pIDOMDoc.CreateInstance(L"Msxml2.DOMDocument");
if ( FAILED(hr) )
{
throw "Unable to create XML parser object";
}
if(PathFileExists(omstrTSFile) == FALSE)
{
return ERR_PATH_INCORRECT;
}
//Create A TestSetup DOM document
CComVariant varFileName((LPCSTR)omstrTSFile);
try
{
pIDOMDoc->load(varFileName);
//GetTest Setup Title
MSXML2::IXMLDOMNodePtr pIDOMTiltleNode;
_bstr_t bstrNodeName = def_STR_TSNODE_NAME;
CComVariant NodeValue;
pIDOMTiltleNode = pIDOMDoc->selectSingleNode(bstrNodeName);
MSXML2::IXMLDOMNamedNodeMapPtr pDOMTCAtrributes;
pDOMTCAtrributes = pIDOMTiltleNode->Getattributes();
MSXML2::IXMLDOMNodePtr pIDOMChildNode;
//bstrNodeName = def_STR_TSATTRIB_TITLE;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_TSATTRIB_TITLE)));
pIDOMChildNode = pDOMTCAtrributes->getNamedItem(bstrNodeName);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
m_omstrTestSetupTitle = strCopyBSTRToCString(NodeValue);
pIDOMChildNode.Release();
//Get Description
//bstrNodeName = def_STR_TSDESCRIPTION;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_TSDESCRIPTION)));
MSXML2::IXMLDOMNodePtr pIDOMDescriptionNode = pIDOMDoc->selectSingleNode(bstrNodeName);
pIDOMDescriptionNode->get_nodeTypedValue(&NodeValue);
m_omstrDescription = strCopyBSTRToCString(NodeValue);
//Get Header Node
//bstrNodeName = def_STR_TSHEADER;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_TSHEADER)));
MSXML2::IXMLDOMNodePtr pIDOMHeaderNode = pIDOMDoc->selectSingleNode(bstrNodeName);
nLoadHeader(pIDOMHeaderNode);
pIDOMHeaderNode.Release();
//Get TestCases List
//bstrNodeName = def_STR_TSTCLIST;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_TSTCLIST)));
MSXML2::IXMLDOMNodePtr pIDOMTSNode = pIDOMDoc->selectSingleNode(bstrNodeName);
GetData(pIDOMTSNode);
}
catch(...)
{
return S_FALSE;
}
return S_OK;
}
示例2: GetData
/******************************************************************************
Function Name : GetData
Input(s) :
Output : HRESULT
Functionality :
Member of : CVerifyResponse
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 06/04/2011
Modifications :
******************************************************************************/
HRESULT CVerifyResponse::GetData(MSXML2::IXMLDOMNodePtr& pIDomNode)
{
CVerifyEntity::GetData(pIDomNode);
_bstr_t bstrNodeName = def_STR_VERIFYMSG_NODE;
CComVariant NodeValue;
MSXML2::IXMLDOMNamedNodeMapPtr pDOMVerifyAtrributes;
MSXML2::IXMLDOMNodePtr pIDOMChildNode;
pDOMVerifyAtrributes = pIDomNode->Getattributes();
//bstrNodeName = def_STR_ATTRIB_WAITFOR;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_ATTRIB_WAITFOR)));
pIDOMChildNode = pDOMVerifyAtrributes->getNamedItem(bstrNodeName);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
CString strTemp;
strTemp = strCopyBSTRToCString(NodeValue);
//W4 Removal
m_ushDuration = (USHORT)atoi((LPCSTR)strTemp);
INT nCount = (INT)m_ouData.m_odVerify_MessageEntityList.GetCount();
for(int i = 0; i < nCount; i++)
{
CVerify_MessageData ouVerifyData;
POSITION pos = m_ouData.m_odVerify_MessageEntityList.FindIndex(i);
CVerify_MessageEntity& ouVerifyEntity = m_ouData.m_odVerify_MessageEntityList.GetAt(pos);
ouVerifyEntity.GetEntityData(VERIFY_MESSAGE, &ouVerifyData);
m_ouVerifyMsgMap[ouVerifyData.m_dwMessageID] = ouVerifyData;
}
return S_OK;
}
示例3: GetData
/******************************************************************************
Function Name : GetData
Input(s) : MSXML2::IXMLDOMNodePtr& pIDomNode
Output : HRESULT
Functionality :
Member of : CReplayEntity
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 06/04/2011
Modifications :
******************************************************************************/
HRESULT CReplayEntity::GetData(MSXML2::IXMLDOMNodePtr& pIDomNode)
{
CComVariant NodeValue;
pIDomNode->get_nodeTypedValue(&NodeValue);
m_omFilePath = strCopyBSTRToCString(NodeValue);
m_omFilePath.Remove('\"');
return S_OK;
}
示例4: GetCommonVerifyData
/******************************************************************************
Function Name : GetData
Input(s) :
Output : HRESULT
Functionality :
Member of : CVerifyEntity
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 06/04/2011
Modifications :
******************************************************************************/
HRESULT CVerifyEntity::GetCommonVerifyData(MSXML2::IXMLDOMNodePtr& pIDomNode, CVerifyData *verifyData)
{
m_ouData = verifyData;
_bstr_t bstrNodeName = def_STR_VERIFYMSG_NODE;
CComVariant NodeValue;
MSXML2::IXMLDOMNamedNodeMapPtr pDOMVerifyAtrributes;
MSXML2::IXMLDOMNodePtr pIDOMChildNode;
pDOMVerifyAtrributes = pIDomNode->Getattributes();
//bstrNodeName = L"failure";
bstrNodeName.Assign(SysAllocString(CT2W("failure")));
pIDOMChildNode = pDOMVerifyAtrributes->getNamedItem(bstrNodeName);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
CString strTemp;
strTemp = strCopyBSTRToCString(NodeValue);
//m_ouData = new CVerifyData();
if(strTemp == "SUCCESS")
{
m_ouData->m_eAttributeError = SUCCESS;
}
else if(strTemp == "WARNING")
{
m_ouData->m_eAttributeError = WARNING;
}
else if(strTemp == "ERRORS")
{
m_ouData->m_eAttributeError = ERRORS;
}
else
{
m_ouData->m_eAttributeError = FATAL;
}
MSXML2::IXMLDOMNodeListPtr pIDOMSendList;
LONG lCount;
//bstrNodeName = def_STR_VERIFYMSG_NODE;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_VERIFYMSG_NODE)));
pIDOMSendList = pIDomNode->selectNodes(bstrNodeName);
pIDOMSendList->get_length(&lCount);
for(int i = 0; i < lCount; i++)
{
CVerifySubEntity *odVerifySubEntity;
MSXML2::IXMLDOMNodePtr pIXMLDOMVerifyMsgEntity;
pIXMLDOMVerifyMsgEntity = pIDOMSendList->Getitem(i);
//if(CVerifySubEntity::GetData(&odVerifySubEntity, pIXMLDOMVerifyMsgEntity) == S_OK)
if(this->GetSubEntityData(&odVerifySubEntity, pIXMLDOMVerifyMsgEntity) == S_OK)
{
m_ouData->m_odVerifySubEntityList.push_back(odVerifySubEntity);
}
}
return S_OK;
}
示例5: nLoadHeader
/******************************************************************************
Function Name : nLoadHeader
Input(s) : MSXML2::IXMLDOMNodePtr& pHeaderDOMNode
Output : INT
Functionality : Retrives 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
//bstrNodeName = def_STR_LISTOFDB;
bstrNodeName.Assign(SysAllocString(CT2W(def_STR_LISTOFDB)));
pInfoNode = pHeaderDOMNode->selectSingleNode(bstrNodeName);
pInfoNode->get_nodeTypedValue(&NodeValue);
m_ouTestSetupHeader.m_omDatabasePath = strCopyBSTRToCString(NodeValue);
//Set The Database Path
SetDatabaseFile(m_ouTestSetupHeader.m_omDatabasePath);
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;
}
else
{
m_ouTestSetupHeader.m_sReportFile.m_eType = TXT;
}
//bstrNodeName = def_STR_REPORT_PATH;
//.........这里部分代码省略.........