yhook: avoid parameters from xml closing tag

Origin commit data
------------------
Commit: acf58551a8
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-23 (Tue, 23 Aug 2016)

Origin message was:
------------------
- yhook: avoid parameters from xml closing tag
This commit is contained in:
vanhofen
2016-08-23 14:26:51 +02:00
parent 2891e335b1
commit 765957f617

View File

@@ -444,10 +444,11 @@ std::string CyhookHandler::outSingle(std::string _content) {
//-----------------------------------------------------------------------------
std::string CyhookHandler::outPair(std::string _key, std::string _content, bool _next) {
std::string result = "";
std::string result = "", _key_close = "", tmp;
ySplitString(_key, " ", _key_close, tmp);
switch (outType) {
case xml:
result = outIndent() + "<" + _key + ">" + _content + "</" + _key + ">";
result = outIndent() + "<" + _key + ">" + _content + "</" + _key_close + ">";
break;
case json:
result = outIndent() + "\"" + _key + "\": \"" + _content + "\"";
@@ -466,11 +467,12 @@ std::string CyhookHandler::outPair(std::string _key, std::string _content, bool
//-----------------------------------------------------------------------------
std::string CyhookHandler::outArray(std::string _key, std::string _content, bool _next) {
std::string result = "";
std::string result = "", _key_close = "", tmp;
ySplitString(_key, " ", _key_close, tmp);
switch (outType) {
case xml:
//TODO: xml check and DESC check
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key + ">";
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key_close + ">";
result += "\n";
break;
case json:
@@ -489,11 +491,12 @@ std::string CyhookHandler::outArray(std::string _key, std::string _content, bool
//-----------------------------------------------------------------------------
std::string CyhookHandler::outArrayItem(std::string _key, std::string _content, bool _next) {
std::string result = "";
std::string result = "", _key_close = "", tmp;
ySplitString(_key, " ", _key_close, tmp);
switch (outType) {
case xml:
//TODO: xml check and DESC check
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key + ">";
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key_close + ">";
result += "\n";
break;
case json:
@@ -511,11 +514,12 @@ std::string CyhookHandler::outArrayItem(std::string _key, std::string _content,
}
//-----------------------------------------------------------------------------
std::string CyhookHandler::outObject(std::string _key, std::string _content, bool _next) {
std::string result = "";
std::string result = "", _key_close = "", tmp;
ySplitString(_key, " ", _key_close, tmp);
switch (outType) {
case xml:
//TODO: xml check and DESC check
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key + ">";
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key_close + ">";
result += "\n";
break;
case json: