/* Shared helper routines for manipulating XML.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 Free Software Foundation, Inc.
This file is part of GDB.
#ifndef XML_UTILS_H
#define XML_UTILS_H
-/* Return a malloc allocated string with special characters from TEXT
- replaced by entity references. */
+/* Return a string with special characters from TEXT replaced by entity
+ references. */
-extern char *xml_escape_text (const char *text);
+extern std::string xml_escape_text (const char *text);
+
+/* Append TEXT to RESULT, with special characters replaced by entity
+ references. */
+
+extern void xml_escape_text_append (std::string *result, const char *text);
#endif