summaryrefslogtreecommitdiff
path: root/tools.cpp
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2007-10-25 16:38:51 +0000
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2007-10-25 16:38:51 +0000
commitb9542da7561744534b482deae6f087ac020935cb (patch)
tree0ed1ce9d7101f5c17d5a2cf79194a6238e3b08b8 /tools.cpp
parent3e27a5e446e94a306569a9116e0d5eaa0f3f6b04 (diff)
downloadvdr-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.cpp12
1 files changed, 12 insertions, 0 deletions
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 <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