----------------------------------------------------------------------------- Get element value if it exists. Used to extract a text node from the element. for example. -----------------------------------------------------------------------------
| 503 | // for example. |
| 504 | // ----------------------------------------------------------------------------- |
| 505 | const char* SimXMLDocument::elementValue() |
| 506 | { |
| 507 | if(m_paNode.empty()) |
| 508 | { |
| 509 | return StringTable->EmptyString(); |
| 510 | } |
| 511 | const S32 iLastElement = m_paNode.size() - 1; |
| 512 | tinyxml2::XMLNode* pNode = m_paNode[iLastElement]; |
| 513 | if(!pNode) |
| 514 | { |
| 515 | return StringTable->EmptyString(); |
| 516 | } |
| 517 | |
| 518 | return pNode->Value(); |
| 519 | } |
| 520 | |
| 521 | DefineEngineMethod( SimXMLDocument, elementValue, const char*, (),, |
| 522 | "@brief Get the Element's value if it exists.\n\n" |
no test coverage detected