summaryrefslogtreecommitdiff
path: root/src/xine-utils/xmlparser.h
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2005-01-16 17:51:04 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2005-01-16 17:51:04 +0000
commitc085fd10b4ad686c90d25264bdda16b7396ecc63 (patch)
treecb59c060f90e9aaf4be71f69d566413498808220 /src/xine-utils/xmlparser.h
parent8cd4d1886b68c6db4106e007ecdd0cdb8070b7cf (diff)
downloadxine-lib-c085fd10b4ad686c90d25264bdda16b7396ecc63.tar.gz
xine-lib-c085fd10b4ad686c90d25264bdda16b7396ecc63.tar.bz2
Add basic support for character entities:
- recognise &quot; &apos; &amp; &lt; &gt; &#X; (1<=X<256) - automatic decoding for text and for attribute values - provide a function for front-ends to use to escape text for XML output CVS patchset: 7352 CVS date: 2005/01/16 17:51:04
Diffstat (limited to 'src/xine-utils/xmlparser.h')
-rw-r--r--src/xine-utils/xmlparser.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/xine-utils/xmlparser.h b/src/xine-utils/xmlparser.h
index ccf982f66..45217d3f9 100644
--- a/src/xine-utils/xmlparser.h
+++ b/src/xine-utils/xmlparser.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xmlparser.h,v 1.2 2003/07/19 00:22:43 tmattern Exp $
+ * $Id: xmlparser.h,v 1.3 2005/01/16 17:51:04 dsalt Exp $
*
*/
#ifndef XML_PARSER_H
@@ -60,6 +60,18 @@ int xml_parser_get_property_int (xml_node_t *node, const char *name,
int xml_parser_get_property_bool (xml_node_t *node, const char *name,
int def_value);
+/* for output:
+ * returns an escaped string (free() it when done)
+ * input must be in ASCII or UTF-8
+ */
+
+typedef enum {
+ XML_ESCAPE_NO_QUOTE,
+ XML_ESCAPE_SINGLE_QUOTE,
+ XML_ESCAPE_DOUBLE_QUOTE
+} xml_escape_quote_t;
+char *xml_escape_string (const char *s, xml_escape_quote_t quote_type);
+
/* for debugging purposes: dump read-in xml tree in a nicely
* indented fashion
*/