Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/libxml/chromium/libxml_utils.h

Issue 22337003: Made XmlWriter able to write elements with both attributes and content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxml/chromium/libxml_utils.h
diff --git a/third_party/libxml/chromium/libxml_utils.h b/third_party/libxml/chromium/libxml_utils.h
index d230c5d9b23f3a5a561425a12beb49501de87256..80d05f67d8df1a66fe3b5fe280af96fb34fbabd7 100644
--- a/third_party/libxml/chromium/libxml_utils.h
+++ b/third_party/libxml/chromium/libxml_utils.h
@@ -133,6 +133,12 @@ class XmlWriter {
return xmlTextWriterEndElement(writer_) >= 0;
}
+ // Appends to the content of the current open element.
+ bool AppendElementContent(const std::string& content) {
+ return xmlTextWriterWriteString(writer_,
+ BAD_CAST content.c_str()) >= 0;
+ }
+
// Adds an attribute to the current open element. Returns false on error.
bool AddAttribute(const std::string& attribute_name,
const std::string& attribute_value) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698