_bstr_t MTConnectStreamsParser::GetElement(MSXML2::IXMLDOMNodePtr node)
{
	_bstr_t text= L"";;
	CComPtr<IXMLDOMElement> domElement;
	text=node->GetnodeName(); 
	return text;
}
Esempio n. 2
0
//取得节点
MSXML2::IXMLDOMNodePtr CXmlBase::GetFirstChildNodeWithoutComment(MSXML2::IXMLDOMNodePtr pParentNode)
{
	MSXML2::IXMLDOMNodePtr pNode = NULL;
	static const _bstr_t bstr_commentstr("#comment");
	if (pParentNode == NULL) return NULL;
	try
	{
		pNode = pParentNode->GetfirstChild();
		while (pNode != NULL)
		{
			if (pNode->GetnodeName() == bstr_commentstr)
			{
				pNode = pNode->GetnextSibling();
				continue;
			}
			break;
		}
	}
	catch (...)
	{
		return NULL;
	}
	return pNode;
}