如何使用 MSXML解析XML ? 本帖最后由 VisualEleven 于 2013-08-19 18:11:32 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 MSXML2::IXMLDOMNamedNodeMapPtr pAttrs; MSXML2::IXMLDOMNodePtr pAttrItem; pNode->get_attributes(&pAttrs);//pNode为当前Item节点 pNode->get_childNodes(&nodeList); long nCount; pAttrs->get_length(&nCount); //获取节点属性个数 CString strAttrName; CString strAttrValue; for(int j = 0; j < nCount; j++) { pAttrs->get_item(j,&pAttrItem); //CString strAttrName = (LPCTSTR)(_bstr_t)pAttrItem->nodeName; //获取属性名 strAttrValue = (LPCTSTR)(_bstr_t)pAttrItem>nodeTypedValue;//获取属性值 } 知道编码怎么清除IE的SSL状态吗?WINDOWS环境下 ADO 建表 骗人的紫光上海分公司负责人! unicode编程中类型转换问题? 紧急求助!关于客户端管理多UDP套接字,采用什么模型可以具备超时重发机制? 屏幕抓图操作(熬了一个晚上还是不行啊,求求各位了!!!) 怎么通过对话框修改直线的属性 VS2010 的BUG? _variant_t中的BSTR会自动释放吗?谢谢! Windows中是否有subclass的概念? 【求助】MFC中对话框英文界面的实现 调用DoDragDrop后,怎么判断是拖放到了本进程还是其他进程
MSXML2::IXMLDOMNodePtr pAttrItem;
pNode->get_attributes(&pAttrs);//pNode为当前Item节点
pNode->get_childNodes(&nodeList);
long nCount;
pAttrs->get_length(&nCount); //获取节点属性个数
CString strAttrName;
CString strAttrValue;
for(int j = 0; j < nCount; j++)
{
pAttrs->get_item(j,&pAttrItem); //CString
strAttrName = (LPCTSTR)(_bstr_t)pAttrItem->nodeName; //获取属性名
strAttrValue = (LPCTSTR)(_bstr_t)pAttrItem>nodeTypedValue;//获取属性值
}