| 114 | |
| 115 | |
| 116 | XmlElement * |
| 117 | XmlElement::elementFor( const std::string &name ) const |
| 118 | { |
| 119 | Elements::const_iterator itElement = m_elements.begin(); |
| 120 | for ( ; itElement != m_elements.end(); ++itElement ) |
| 121 | { |
| 122 | if ( (*itElement)->name() == name ) |
| 123 | return *itElement; |
| 124 | } |
| 125 | |
| 126 | throw std::invalid_argument( "XmlElement::elementFor(), not matching child element found" ); |
| 127 | return NULL; // make some compilers happy. |
| 128 | } |
| 129 | |
| 130 | |
| 131 | std::string |