helper function to get element text as a string, blank if none
| 463 | |
| 464 | // helper function to get element text as a string, blank if none |
| 465 | inline std::string text (const XMLElement * element) |
| 466 | { |
| 467 | if (!element) |
| 468 | throw XmlException ("null element"s); |
| 469 | |
| 470 | if (auto value = element -> GetText()) |
| 471 | return std::string (value); |
| 472 | else |
| 473 | return ""s; |
| 474 | } |
| 475 | |
| 476 | |
| 477 | // append / prepend element |
nothing calls this directly
no test coverage detected