tinyxml2

Function FirstChildElement

Synopsis

#include <tinyxml2/tinyxml2.h>

const XMLElement * tinyxml2::XMLNode::FirstChildElement(const char *value=0) const

XMLElement* tinyxml2::XMLNode::FirstChildElement(const char *value=0)

Description

Get the first child element, or optionally the first child element with the specified name.

const XMLElement * tinyxml2::XMLNode::FirstChildElement(const char *value=0) const

Get the first child element, or optionally the first child element with the specified name.

XMLElement tinyxml2::XMLNode::FirstChildElement(const char value=0)

No description yet.

Examples

//
//

Source

From lines 796-807 in tinyxml2.cpp

const XMLElement* XMLNode::FirstChildElement( const char* value ) const
{
    for( XMLNode* node=_firstChild; node; node=node->_next ) {
        XMLElement* element = node->ToElement();
        if ( element ) {
            if ( !value || XMLUtil::StringEqual( element->Name(), value ) ) {
                return element;
            }
        }
    }
    return 0;
}

From lines 753-755 in tinyxml2.h

XMLElement* FirstChildElement( const char* value=0 )    {
    return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->FirstChildElement( value ));
}


Discussions

There are 0 discussions relevant for this page, and 1 discussions in the whole project.




Add Discussion

Log in to comment