----------------------------------------------------------------------------- Get true if given attribute exists. -----------------------------------------------------------------------------
| 595 | // Get true if given attribute exists. |
| 596 | // ----------------------------------------------------------------------------- |
| 597 | bool SimXMLDocument::attributeExists(const char* rAttribute) |
| 598 | { |
| 599 | if(m_paNode.empty()) |
| 600 | { |
| 601 | return false; |
| 602 | } |
| 603 | const S32 iLastElement = m_paNode.size() - 1; |
| 604 | tinyxml2::XMLElement* pNode = m_paNode[iLastElement]->ToElement(); |
| 605 | if(!pNode) |
| 606 | { |
| 607 | return false; |
| 608 | } |
| 609 | |
| 610 | if(!pNode->Attribute(rAttribute)) |
| 611 | { |
| 612 | return false; |
| 613 | } |
| 614 | |
| 615 | return true; |
| 616 | } |
| 617 | |
| 618 | DefineEngineMethod( SimXMLDocument, attributeExists, bool, ( const char* attributeName ),, |
| 619 | "@brief Tests if the requested attribute exists.\n\n" |
no test coverage detected