Logo Search packages:      
Sourcecode: passwordmaker-cli version File versions  Download package

void TiXmlElement::SetAttribute ( const char *  name,
const char *  _value 
)

Sets an attribute of name to a given value. The attribute will be created if it does not exist, or changed if it does.

Definition at line 746 of file tinyxml.cpp.

References TiXmlNode::GetDocument(), and TiXmlAttribute::SetValue().

Referenced by SetAttribute(), and SetDoubleAttribute().

{
      TiXmlAttribute* node = attributeSet.Find( name );
      if ( node )
      {
            node->SetValue( _value );
            return;
      }

      TiXmlAttribute* attrib = new TiXmlAttribute( name, _value );
      if ( attrib )
      {
            attributeSet.Add( attrib );
      }
      else
      {
            TiXmlDocument* document = GetDocument();
            if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );
      }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index