26 #ifndef _OPENVAS_LIBRARIES_XML_H
27 #define _OPENVAS_LIBRARIES_XML_H
30 #include <gnutls/gnutls.h>
GHashTable * attributes
Attributes.
Definition: xml.h:50
entity_t add_entity(entities_t *entities, const char *name, const char *text)
Add an XML entity to a tree of entities.
Definition: xml.c:134
int compare_entities(entity_t entity1, entity_t entity2)
Compare two XML entity.
Definition: xml.c:947
int read_entity_and_text(gnutls_session_t *session, entity_t *entity, char **text)
Read an XML entity tree from the manager.
Definition: xml.c:622
entity_t first_entity(entities_t entities)
Return the first entity from an entities_t.
Definition: xml.c:115
int read_entity(gnutls_session_t *session, entity_t *entity)
Read an XML entity tree from the manager.
Definition: xml.c:687
char * entity_text(entity_t entity)
Get the text an entity.
Definition: xml.c:178
int xml_count_entities(entities_t entities)
Count the number of entities.
Definition: xml.c:1013
void print_entity_format(entity_t entity, gpointer indent)
Print an XML entity to stdout, recusively printing its children.
Definition: xml.c:888
void xml_string_append(GString *xml, const char *format,...)
Append formatted escaped XML to a string.
Definition: xml.c:1034
XML element.
Definition: xml.h:46
void print_entity(FILE *stream, entity_t entity)
Print an XML entity.
Definition: xml.c:846
entities_t entities
Children.
Definition: xml.h:51
int read_string(gnutls_session_t *session, GString **string)
Read entity and text. Free the entity immediately.
Definition: xml.c:651
int try_read_entity(gnutls_session_t *session, int timeout, entity_t *entity)
Try read an XML entity tree from the manager.
Definition: xml.c:673
char * entity_name(entity_t entity)
Get the name an entity.
Definition: xml.c:191
const char * entity_attribute(entity_t entity, const char *name)
Get an attribute of an entity.
Definition: xml.c:241
entities_t next_entities(entities_t entities)
Return all the entities from an entities_t after the first.
Definition: xml.c:100
int parse_entity(const char *string, entity_t *entity)
Read an XML entity tree from a string.
Definition: xml.c:701
void print_entity_to_string(entity_t entity, GString *string)
Print an XML entity tree to a GString, appending it if string is not.
Definition: xml.c:799
struct entity_s * entity_t
Definition: xml.h:53
int try_read_entity_and_string(gnutls_session_t *session, int timeout, entity_t *entity, GString **string_return)
Try read an XML entity tree from the manager.
Definition: xml.c:397
char * name
Name.
Definition: xml.h:48
GSList * entities_t
Definition: xml.h:41
entity_t entity_child(entity_t entity, const char *name)
Get a child of an entity.
Definition: xml.c:220
void free_entity(entity_t entity)
Free an entity, recursively.
Definition: xml.c:148
int read_entity_and_string(gnutls_session_t *session, entity_t *entity, GString **string_return)
Try read an XML entity tree from the manager.
Definition: xml.c:603
char * text
Text.
Definition: xml.h:49