本文整理汇总了C++中msxml2::IXMLDOMNodeListPtr::QueryInterface方法的典型用法代码示例。如果您正苦于以下问题:C++ IXMLDOMNodeListPtr::QueryInterface方法的具体用法?C++ IXMLDOMNodeListPtr::QueryInterface怎么用?C++ IXMLDOMNodeListPtr::QueryInterface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类msxml2::IXMLDOMNodeListPtr
的用法示例。
在下文中一共展示了IXMLDOMNodeListPtr::QueryInterface方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveSelection
void CSimpleFilterDialog::SaveSelection(void)
{
POSITION pos = m_ResultList.GetFirstSelectedItemPosition();
//okopiruje vzorovy element selection
MSXML2::IXMLDOMElementPtr selection_elem = m_active_element->ownerDocument->createElement("selection");
MSXML2::IXMLDOMAttributePtr id_attr = m_active_element->ownerDocument->createAttribute("id");
selection_elem->setAttributeNode(id_attr);
id_attr.Release();
//vymaze vsechny selection
MSXML2::IXMLDOMNodeListPtr list = m_cloned_active_element->selectNodes("filter[@type='simple']/selection");
MSXML2::IXMLDOMSelection * sel;
list.QueryInterface(__uuidof(MSXML2::IXMLDOMSelection), &sel);
sel->removeAll();
sel->Release();
MSXML2::IXMLDOMNodePtr filter = m_cloned_active_element->selectSingleNode("filter[@type='simple']");
while (pos)
{
int nItem = m_ResultList.GetNextSelectedItem(pos);
selection_elem->setAttribute("id", (LPCTSTR) m_ResultList.GetItemText(nItem, 0));
filter->appendChild(selection_elem->cloneNode(VARIANT_FALSE));
}
selection_elem.Release();
}