From b9542da7561744534b482deae6f087ac020935cb Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Thu, 25 Oct 2007 16:38:51 +0000 Subject: - additional timer info in popup menu in timers menu --- tools.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools.cpp') diff --git a/tools.cpp b/tools.cpp index a1fbaf1..3851808 100644 --- a/tools.cpp +++ b/tools.cpp @@ -230,4 +230,16 @@ string StringUrlEncode( string const& input ) return ostr.str(); } +// returns the content of ... +string GetXMLValue( std::string const& xml, std::string const& element ) +{ + string start = "<" + element + ">"; + string end = ""; + 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 -- cgit v1.2.3