File xml.h
File List > include > lsl > xml.h
Go to the documentation of this file
#pragma once
#include "common.h"
#include "types.h"
// XML Tree Navigation
extern LIBLSL_C_API lsl_xml_ptr lsl_first_child(lsl_xml_ptr e);
extern LIBLSL_C_API lsl_xml_ptr lsl_last_child(lsl_xml_ptr e);
extern LIBLSL_C_API lsl_xml_ptr lsl_next_sibling(lsl_xml_ptr e);
extern LIBLSL_C_API lsl_xml_ptr lsl_previous_sibling(lsl_xml_ptr e);
extern LIBLSL_C_API lsl_xml_ptr lsl_parent(lsl_xml_ptr e);
// XML Tree Navigation by Name
extern LIBLSL_C_API lsl_xml_ptr lsl_child(lsl_xml_ptr e, const char *name);
extern LIBLSL_C_API lsl_xml_ptr lsl_next_sibling_n(lsl_xml_ptr e, const char *name);
extern LIBLSL_C_API lsl_xml_ptr lsl_previous_sibling_n(lsl_xml_ptr e, const char *name);
// Content Queries
extern LIBLSL_C_API int32_t lsl_empty(lsl_xml_ptr e);
extern LIBLSL_C_API int32_t lsl_is_text(lsl_xml_ptr e);
extern LIBLSL_C_API const char *lsl_name(lsl_xml_ptr e);
extern LIBLSL_C_API const char *lsl_value(lsl_xml_ptr e);
extern LIBLSL_C_API const char *lsl_child_value(lsl_xml_ptr e);
extern LIBLSL_C_API const char *lsl_child_value_n(lsl_xml_ptr e, const char *name);
// Data Modification
extern LIBLSL_C_API lsl_xml_ptr lsl_append_child_value(lsl_xml_ptr e, const char *name, const char *value);
extern LIBLSL_C_API lsl_xml_ptr lsl_prepend_child_value(lsl_xml_ptr e, const char *name, const char *value);
extern LIBLSL_C_API int32_t lsl_set_child_value(lsl_xml_ptr e, const char *name, const char *value);
extern LIBLSL_C_API int32_t lsl_set_name(lsl_xml_ptr e, const char *rhs);
extern LIBLSL_C_API int32_t lsl_set_value(lsl_xml_ptr e, const char *rhs);
extern LIBLSL_C_API lsl_xml_ptr lsl_append_child(lsl_xml_ptr e, const char *name);
extern LIBLSL_C_API lsl_xml_ptr lsl_prepend_child(lsl_xml_ptr e, const char *name);
extern LIBLSL_C_API lsl_xml_ptr lsl_append_copy(lsl_xml_ptr e, lsl_xml_ptr e2);
extern LIBLSL_C_API lsl_xml_ptr lsl_prepend_copy(lsl_xml_ptr e, lsl_xml_ptr e2);
extern LIBLSL_C_API void lsl_remove_child_n(lsl_xml_ptr e, const char *name);
extern LIBLSL_C_API void lsl_remove_child(lsl_xml_ptr e, lsl_xml_ptr e2);