diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-10-25 16:38:51 +0000 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-10-25 16:38:51 +0000 |
commit | b9542da7561744534b482deae6f087ac020935cb (patch) | |
tree | 0ed1ce9d7101f5c17d5a2cf79194a6238e3b08b8 /tools.cpp | |
parent | 3e27a5e446e94a306569a9116e0d5eaa0f3f6b04 (diff) | |
download | vdr-plugin-live-b9542da7561744534b482deae6f087ac020935cb.tar.gz vdr-plugin-live-b9542da7561744534b482deae6f087ac020935cb.tar.bz2 |
- additional timer info in popup menu in timers menu
Diffstat (limited to 'tools.cpp')
-rw-r--r-- | tools.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -230,4 +230,16 @@ string StringUrlEncode( string const& input ) return ostr.str(); } +// returns the content of <element>...</element> +string GetXMLValue( std::string const& xml, std::string const& element ) +{ + string start = "<" + element + ">"; + string end = "</" + element + ">"; + string::size_type startPos = xml.find(start); + if (startPos == string::npos) return ""; + string::size_type endPos = xml.find(end); + if (endPos == string::npos) return ""; + return xml.substr(startPos + start.size(), endPos - startPos - start.size()); +} + } // namespace vdrlive |