From fa1f05f1fc3e4d82146cd043b9d373078f31f3bc Mon Sep 17 00:00:00 2001 From: rylek Date: Wed, 14 Apr 2010 06:42:24 +0000 Subject: [PATCH] .TCore: xml utility funtions (continued) git-svn-id: svn://ultimatepp.org/upp/trunk@2320 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/TCore/util.cpp | 10 ++++++++++ uppsrc/TCore/util.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/uppsrc/TCore/util.cpp b/uppsrc/TCore/util.cpp index d7ddb8e9c..894ed6454 100644 --- a/uppsrc/TCore/util.cpp +++ b/uppsrc/TCore/util.cpp @@ -1337,6 +1337,16 @@ bool WildcardCompare::RawMatches(const wchar *s, const wchar *templ) const return true; } +void TagXml(StringBuffer& xml, const char *tag) +{ + xml << '<' << tag << ">\n"; +} + +void EndTagXml(StringBuffer& xml, const char *tag) +{ + xml << "\n"; +} + void StringXml(StringBuffer& xml, const char *tag, const String& str) { xml << '<' << tag << '>' << DeXml(str) << "\n"; diff --git a/uppsrc/TCore/util.h b/uppsrc/TCore/util.h index 9db5505dc..a3b791164 100644 --- a/uppsrc/TCore/util.h +++ b/uppsrc/TCore/util.h @@ -285,6 +285,8 @@ public: bool Matches(const wchar *s) const { return raw_templ.GetCount() == 0 || RawMatches(s, cvt_templ); } }; +void TagXml(StringBuffer& xml, const char *tag); +void EndTagXml(StringBuffer& xml, const char *tag); void StringXml(StringBuffer& xml, const char *tag, const String& str); void IntXml(StringBuffer& xml, const char *tag, int v); void BoolXml(StringBuffer& xml, const char *tag, bool b);