diff options
author | Norbert Preining <norbert@preining.info> | 2019-12-03 03:01:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-12-03 03:01:24 +0000 |
commit | b8d4bb76703bcb15578e2b23c5d256532180b894 (patch) | |
tree | bedd1df7a00521a2bd986b3c0289d6556a59e39b /support/texlab/crates/bibutils_sys/src/xml.h | |
parent | 02e4625a78a5029e8b5dc2a4ec70193b232f497e (diff) |
CTAN sync 201912030301
Diffstat (limited to 'support/texlab/crates/bibutils_sys/src/xml.h')
-rw-r--r-- | support/texlab/crates/bibutils_sys/src/xml.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/support/texlab/crates/bibutils_sys/src/xml.h b/support/texlab/crates/bibutils_sys/src/xml.h new file mode 100644 index 0000000000..56f3eea402 --- /dev/null +++ b/support/texlab/crates/bibutils_sys/src/xml.h @@ -0,0 +1,43 @@ +/* + * xml.h + * + * Copyright (c) Chris Putnam 2004-2019 + * + * Source code released under the GPL version 2 + * + */ +#ifndef XML_H +#define XML_H + +#include "slist.h" +#include "str.h" + +typedef struct xml { + str tag; + str value; + slist attributes; + slist attribute_values; + struct xml *down; + struct xml *next; +} xml; + +void xml_init ( xml *node ); +void xml_free ( xml *node ); +int xml_has_value ( xml *node ); +str * xml_value ( xml *node ); +char * xml_value_cstr ( xml *node ); +str * xml_tag ( xml *node ); +char * xml_tag_cstr ( xml *node ); +int xml_tag_matches ( xml *node, const char *tag ); +int xml_tag_matches_has_value( xml *node, const char *tag ); +str * xml_attribute ( xml *node, const char *attribute ); +char * xml_find_start ( char *buffer, char *tag ); +char * xml_find_end ( char *buffer, char *tag ); +int xml_tag_has_attribute ( xml *node, const char *tag, const char *attribute, const char *attribute_value ); +int xml_has_attribute ( xml *node, const char *attribute, const char *attribute_value ); +const char * xml_parse ( const char *p, xml *onode ); + +extern char * xml_pns; /* global Namespace */ + +#endif + |