----------------------------------------------------------------------------- Set attribute of top stack element to given value. -----------------------------------------------------------------------------
| 783 | // Set attribute of top stack element to given value. |
| 784 | // ----------------------------------------------------------------------------- |
| 785 | void SimXMLDocument::setAttribute(const char* rAttribute, const char* rVal) |
| 786 | { |
| 787 | if(m_paNode.empty()) |
| 788 | { |
| 789 | return; |
| 790 | } |
| 791 | |
| 792 | const S32 iLastElement = m_paNode.size() - 1; |
| 793 | tinyxml2::XMLElement* pElement = m_paNode[iLastElement]->ToElement(); |
| 794 | if(!pElement) |
| 795 | { |
| 796 | return; |
| 797 | } |
| 798 | pElement->SetAttribute(rAttribute, rVal); |
| 799 | } |
| 800 | DefineEngineMethod( SimXMLDocument, setAttribute, void, ( const char* attributeName, const char* value ),, |
| 801 | "@brief Set the attribute of the current Element on the stack to the given value.\n\n" |
| 802 | "@param attributeName Name of attribute being changed\n" |
no test coverage detected