本文整理汇总了C++中msxml2::IXMLDOMDocument2Ptr::selectSingleNode方法的典型用法代码示例。如果您正苦于以下问题:C++ IXMLDOMDocument2Ptr::selectSingleNode方法的具体用法?C++ IXMLDOMDocument2Ptr::selectSingleNode怎么用?C++ IXMLDOMDocument2Ptr::selectSingleNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类msxml2::IXMLDOMDocument2Ptr
的用法示例。
在下文中一共展示了IXMLDOMDocument2Ptr::selectSingleNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetNodePtr
//取得指定xpath的节点
MSXML2::IXMLDOMNodePtr CXmlBase::GetNodePtr(LPCTSTR lpszXPath
, MSXML2::IXMLDOMDocument2Ptr pDoc)
{
if (pDoc == NULL || lpszXPath == NULL) return NULL;
CComBSTR bstrText = _bstr_t(lpszXPath).GetBSTR();
return pDoc->selectSingleNode(bstrText.m_str);
}
示例2: getAxisOrientation
void getAxisOrientation(dae_reader_t *reader, MSXML2::IXMLDOMDocument2Ptr xmlDoc)
{
MSXML2::IXMLDOMNodePtr node = xmlDoc->selectSingleNode("/r:COLLADA/r:asset/r:up_axis");
reader->x = 0;
reader->y = 1;
reader->z = 2;
if (node != NULL)
{
string orientation = node->text;
if (orientation[0] == 'Y')
{
reader->z = 1;
reader->y = 2;
}
}
}
示例3: Init
bool CGameApp::Init()
{
// plasma 2005.07.06 - 디버그 모드에선 그냥 직접 읽고, 릴리즈 모드에선 pak 파일에서 추출해서 사용한다.
#ifdef _DEBUG
// if( !g_TextManager.Load("text_data/text.dat") )
if( !g_TextManager.LoadPack("text.dat", "text_data") )
{
MessageBox( NULL, "Text.Dat load fail", "Error", MB_OK );
}
#else
if( !g_TextManager.LoadPack("text.dat", "text_data") )
{
MessageBox( NULL, "Text.Dat load fail", "Error", MB_OK );
}
#endif
// Create game all systems.
m_pGSystem = new CSystemWin32Imp;
m_pGSystem->Init(m_pProcessInfo);
// 2003/11/19 by impurity create xml system
MSXML2::IXMLDOMDocument2Ptr pDoc = NULL;
//#ifdef _DEBUG
// CFileSys::ConvertBinaryXML("script\\window.xml","script\\window.bml");
// FILE* fIn;
// if(NULL!=(fIn=fopen("script\\window.bml","rb")))
// {
// CFileSys::LoadBinaryXML(pDoc, fIn);
// }
// fclose( fIn );
//#else
DFileGPack packFile;
packFile.Open(SFullName("script","window.bml"));
CFileSys::LoadBinaryXML(pDoc, packFile.GetFile(), packFile.GetSize());
packFile.Close();
//#endif
MSXML2::IXMLDOMNodePtr pNode = NULL;
if(pNode=pDoc->selectSingleNode(L"./root/window/bitperpixel"))
{
m_DisplayMode.iBitPerPixel = (short)pNode->GetnodeTypedValue();
}
else
{
m_DisplayMode.iBitPerPixel = 16;
}
m_DisplayMode.iDeviceType = 0;
//if(pNode=pDoc->selectSingleNode(L"./root/window/fullmode"))
//{
// m_DisplayMode.iFullScreen = (bool)pNode->GetnodeTypedValue();
// ((CProcessInfoWin32Imp *)m_pProcessInfo)->m_bFullScreen = true;
//}
//else
{
m_DisplayMode.iFullScreen = false;
((CProcessInfoWin32Imp *)m_pProcessInfo)->m_bFullScreen = false;
}
m_DisplayMode.iRefreshRate = 0;
m_DisplayMode.iZBufferDepth = 32;
if(pNode=pDoc->selectSingleNode(L"./root/window/width"))
{
m_DisplayMode.iWidth = (short)pNode->GetnodeTypedValue();
}
else
{
m_DisplayMode.iWidth = 800;
}
if(pNode=pDoc->selectSingleNode(L"./root/window/height"))
{
m_DisplayMode.iHeight = (short)pNode->GetnodeTypedValue();
}
else
{
m_DisplayMode.iHeight = 600;
}
CFileSys::UnloadXML(pDoc);
m_pGameFactory = new CGameFactoryImp;
// Register Game factory to Factory System.
m_pGSystem->GetFactorySys()->RegisterGameFactory( m_pGameFactory );
// 3d base initial.
InitPhysics();
CWindowSysWin32Imp* pWindowSysWin32Imp = (CWindowSysWin32Imp*)m_pGSystem->GetWindowSys();
if( !m_pGSystem->GetGControlSys()->Create( pWindowSysWin32Imp->m_hWnd,
m_DisplayMode ) )
{
//.........这里部分代码省略.........