diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-26T17·55+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-26T17·55+0100 |
commit | 91f25f0510db32d627bf5ed7d4067b90e37f2f86 (patch) | |
tree | 0693a9227b93adb66ba76cc975663d4edb6b2394 /src/libutil/xml-writer.cc | |
parent | 432328cc550cea6b6ab23b3eeca69dc2307c5c74 (diff) |
And another one
Diffstat (limited to 'src/libutil/xml-writer.cc')
-rw-r--r-- | src/libutil/xml-writer.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/libutil/xml-writer.cc b/src/libutil/xml-writer.cc index 16dfb6ddc903..01794001b2c6 100644 --- a/src/libutil/xml-writer.cc +++ b/src/libutil/xml-writer.cc @@ -71,18 +71,6 @@ void XMLWriter::writeEmptyElement(const string & name, } -void XMLWriter::writeCharData(const string & data) -{ - assert(!pendingElems.empty()); - for (unsigned int i = 0; i < data.size(); ++i) { - char c = data[i]; - if (c == '<') output << "<"; - else if (c == '&') output << "&"; - else output << c; - } -} - - void XMLWriter::writeAttrs(const XMLAttrs & attrs) { for (XMLAttrs::const_iterator i = attrs.begin(); i != attrs.end(); ++i) { @@ -103,29 +91,4 @@ void XMLWriter::writeAttrs(const XMLAttrs & attrs) } -#if 0 -int main(int argc, char * * argv) -{ - XMLWriter doc(cout); - - // OpenElement e(doc, "foo"); - - doc.openElement("foo"); - - doc.writeCharData("dit is een test &\n"); - doc.writeCharData("<foo>\n"); - - for (int i = 0; i < 5; ++i) { - XMLAttrs attrs; - attrs["a"] = "b"; - attrs["bla"] = "<foo>'&\">"; - XMLOpenElement e(doc, "item", attrs); - doc.writeCharData("x"); - } - - return 0; -} -#endif - - } |