读取XML节点属性
<shape type="square" size=6/>
使用DOM MSXML4分别怎么读取type和size的属性值
[解决办法]
msxml很少用,我用tinyxml
[解决办法]
MSXML2::IXMLDOMNamedNodeMapPtr pAttrs = NULL;
MSXML2::IXMLDOMNodePtr pAttrItem;
childNode->get_attributes(&pAttrs);
long nCount ;
pAttrs->get_length(&nCount);
for(int i = 0; i < nCount; i++)
pAttrs->get_item(i,&pAttrItem);