0x00. 遇到问题
TiXmlNode 不提供节点属性查询,跟进代码查看有friend class TiXmlElement; 友员类,忘记怎么玩了╮(╯▽╰)╭。0x01. 将代码抓取出来class TiXmlNode : public TiXmlBase{friend class TiXmlDocument;friend class TiXmlElement;}class TiXmlElement{}
1 const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const 2 { 3 const TiXmlNode* node; 4 5 for ( node = FirstChild( _value ); 6 node; 7 node = node->NextSibling( _value ) ) 8 { 9 if ( node->ToElement() )10 return node->ToElement();11 }12 return 0;13 }14 15