Go to the documentation of this file.
26 #ifndef _OPENVAS_LIBRARIES_XML_H
27 #define _OPENVAS_LIBRARIES_XML_H
30 #include <gnutls/gnutls.h>
33 #include "../misc/openvas_server.h"
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:1130
struct entity_s * entity_t
Definition: xml.h:55
void free_entity(entity_t)
Free an entity, recursively.
Definition: xml.c:148
int compare_entities(entity_t, entity_t)
Compare two XML entity.
Definition: xml.c:1279
void print_entity_format(entity_t, gpointer indentation)
Print an XML entity to stdout, recusively printing its children.
Definition: xml.c:1220
entities_t next_entities(entities_t)
Return all the entities from an entities_t after the first.
Definition: xml.c:100
entities_t entities
Children.
Definition: xml.h:53
char * name
Name.
Definition: xml.h:50
int read_entity(gnutls_session_t *, entity_t *)
Read an XML entity tree from the manager.
Definition: xml.c:1004
int read_entity_c(openvas_connection_t *, entity_t *)
Read an XML entity tree from the manager.
Definition: xml.c:1018
int parse_entity(const char *, entity_t *)
Read an XML entity tree from a string.
Definition: xml.c:1032
GHashTable * attributes
Attributes.
Definition: xml.h:52
GSList * entities_t
Definition: xml.h:43
int try_read_entity(gnutls_session_t *, int, entity_t *)
Try read an XML entity tree from the manager.
Definition: xml.c:973
GHashTable * find_attributes
Definition: xml.h:64
int try_read_entity_and_string(gnutls_session_t *, int, entity_t *, GString **)
Try read an XML entity tree from the manager.
Definition: xml.c:410
void print_entity(FILE *, entity_t)
Print an XML entity.
Definition: xml.c:1177
Connection.
Definition: openvas_server.h:58
const char * entity_attribute(entity_t, const char *)
Get an attribute of an entity.
Definition: xml.c:241
int try_read_entity_c(openvas_connection_t *, int, entity_t *)
Try read an XML entity tree from the manager.
Definition: xml.c:989
entity_t entity_child(entity_t, const char *)
Get a child of an entity.
Definition: xml.c:220
int read_string_c(openvas_connection_t *, GString **)
Read entity and text. Free the entity immediately.
Definition: xml.c:951
void xml_string_append(GString *, const char *,...)
Append formatted escaped XML to a string.
Definition: xml.c:1366
gchar * find_element
Definition: xml.h:63
int done
Definition: xml.h:62
entity_t first_entity(entities_t)
Return the first entity from an entities_t.
Definition: xml.c:115
int xml_count_entities(entities_t)
Count the number of entities.
Definition: xml.c:1345
char * entity_name(entity_t entity)
Get the name an entity.
Definition: xml.c:191
int try_read_entity_and_string_c(openvas_connection_t *, int, entity_t *, GString **)
Try read an XML entity tree from the manager.
Definition: xml.c:625
XML element.
Definition: xml.h:48
char * entity_text(entity_t entity)
Get the text an entity.
Definition: xml.c:178
int find_element_in_xml_file(gchar *, gchar *, GHashTable *)
Tests if an XML file contains an element with given attributes.
Definition: xml.c:1463
char * text
Text.
Definition: xml.h:51
Data for xml search functions.
Definition: xml.h:60
int read_entity_and_string(gnutls_session_t *, entity_t *, GString **)
Try read an XML entity tree from the manager.
Definition: xml.c:831
entity_t add_entity(entities_t *, const char *, const char *)
Add an XML entity to a tree of entities.
Definition: xml.c:134
int read_entity_and_text(gnutls_session_t *, entity_t *, char **)
Read an XML entity tree from the manager.
Definition: xml.c:871
int read_entity_and_string_c(openvas_connection_t *, entity_t *, GString **)
Try read an XML entity tree from the manager.
Definition: xml.c:852
int found
Definition: xml.h:61
int read_entity_and_text_c(openvas_connection_t *, entity_t *, char **)
Read an XML entity tree from the manager.
Definition: xml.c:903
int read_string(gnutls_session_t *, GString **)
Read entity and text. Free the entity immediately.
Definition: xml.c:931