|
Subversion
|
Go to the documentation of this file.
31 #include <apr_pools.h>
42 #define SVN_XML_NAMESPACE "svn:"
160 typedef void (*svn_xml_start_elem)(
void *baton,
164 typedef void (*svn_xml_end_elem)(
void *baton,
const char *name);
167 typedef void (*svn_xml_char_data)(
void *baton,
183 svn_xml_start_elem start_handler,
184 svn_xml_end_elem end_handler,
185 svn_xml_char_data data_handler,
239 const char *
const *atts);
305 const char *encoding,
371 apr_hash_t *attributes);
382 const
char *tagname);
void svn_xml_make_close_tag(svn_stringbuf_t **str, apr_pool_t *pool, const char *tagname)
Store an xml close tag tagname in str.
svn_boolean_t svn_xml_is_xml_safe(const char *data, apr_size_t len)
Determine if a string of character data of length len is a safe bet for use with the svn_xml_escape_*...
void svn_xml_escape_cdata_stringbuf(svn_stringbuf_t **outstr, const svn_stringbuf_t *string, apr_pool_t *pool)
Create or append in *outstr an xml-escaped version of string, suitable for output as character data.
void svn_xml_escape_cdata_string(svn_stringbuf_t **outstr, const svn_string_t *string, apr_pool_t *pool)
Same as svn_xml_escape_cdata_stringbuf(), but string is an svn_string_t.
svn_xml_open_tag_style
Used as style argument to svn_xml_make_open_tag() and friends.
void svn_xml_make_open_tag(svn_stringbuf_t **str, apr_pool_t *pool, enum svn_xml_open_tag_style style, const char *tagname,...)
Store a new xml tag tagname in *str.
Counted-length strings for Subversion, plus some C string goodies.
void svn_xml_escape_cdata_cstring(svn_stringbuf_t **outstr, const char *string, apr_pool_t *pool)
Same as svn_xml_escape_cdata_stringbuf(), but string is a NULL-terminated C string.
void svn_xml_signal_bailout(svn_error_t *error, svn_xml_parser_t *svn_parser)
The way to officially bail out of xml parsing.
void svn_xml_escape_attr_stringbuf(svn_stringbuf_t **outstr, const svn_stringbuf_t *string, apr_pool_t *pool)
Create or append in *outstr an xml-escaped version of string, suitable for output as an attribute val...
@ svn_xml_normal
<tag ...>
#define SVN_NEEDS_SENTINEL_NULL
Macro used to mark functions that require a final null sentinel argument.
apr_hash_t * svn_xml_make_att_hash(const char **atts, apr_pool_t *pool)
Create a hash that corresponds to Expat xml attribute list atts.
svn_xml_parser_t * svn_xml_make_parser(void *baton, svn_xml_start_elem start_handler, svn_xml_end_elem end_handler, svn_xml_char_data data_handler, apr_pool_t *pool)
Create a general Subversion XML parser.
void svn_xml_make_open_tag_v(svn_stringbuf_t **str, apr_pool_t *pool, enum svn_xml_open_tag_style style, const char *tagname, va_list ap)
Like svn_xml_make_open_tag(), but takes a va_list instead of being variadic.
@ svn_xml_protect_pcdata
<tag ...>, no cosmetic newline
const char * svn_xml_fuzzy_escape(const char *string, apr_pool_t *pool)
Return UTF-8 string string if it contains no characters that are unrepresentable in XML.
void svn_xml_make_header(svn_stringbuf_t **str, apr_pool_t *pool)
Like svn_xml_make_header2(), but does not emit encoding information.
svn_error_t * svn_xml_parse(svn_xml_parser_t *svn_parser, const char *buf, apr_size_t len, svn_boolean_t is_final)
Push len bytes of xml data in buf at svn_parser.
apr_hash_t * svn_xml_ap_to_hash(va_list ap, apr_pool_t *pool)
Create an attribute hash from va_list ap.
void svn_xml_make_header2(svn_stringbuf_t **str, const char *encoding, apr_pool_t *pool)
Create an XML header and return it in *str.
void svn_xml_escape_attr_string(svn_stringbuf_t **outstr, const svn_string_t *string, apr_pool_t *pool)
Same as svn_xml_escape_attr_stringbuf(), but string is an svn_string_t.
void svn_xml_escape_attr_cstring(svn_stringbuf_t **outstr, const char *string, apr_pool_t *pool)
Same as svn_xml_escape_attr_stringbuf(), but string is a NULL-terminated C string.
void svn_xml_make_open_tag_hash(svn_stringbuf_t **str, apr_pool_t *pool, enum svn_xml_open_tag_style style, const char *tagname, apr_hash_t *attributes)
Like svn_xml_make_open_tag(), but takes a hash table of attributes (char * keys mapping to char * val...
int svn_boolean_t
YABT: Yet Another Boolean Type.
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
void svn_xml_hash_atts_overlaying(const char **atts, apr_hash_t *ht, apr_pool_t *pool)
Like svn_xml_make_att_hash(), but takes a hash and overwrites key/value pairs already in it that also...
struct svn_xml_parser_t svn_xml_parser_t
A generalized Subversion XML parser object.
const char * svn_xml_get_attr_value(const char *name, const char *const *atts)
Return the value associated with name in expat attribute array atts, else return NULL.
void svn_xml_free_parser(svn_xml_parser_t *svn_parser)
Free a general Subversion XML parser.
void svn_xml_hash_atts_preserving(const char **atts, apr_hash_t *ht, apr_pool_t *pool)
Like svn_xml_make_att_hash(), but takes a hash and preserves any key/value pairs already in it.
A buffered string, capable of appending without an allocation and copy for each append.
@ svn_xml_self_closing
<tag .../>