2 #include "../acl_cpp_define.hpp" 33 virtual const char* get_name(
void)
const = 0;
40 virtual const char* get_value(
void)
const = 0;
59 virtual const char* tag_name(
void)
const = 0;
65 virtual const char* id(
void)
const = 0;
71 virtual const char* text(
void)
const = 0;
78 virtual const char* attr_value(
const char*
name)
const = 0;
85 const char* operator[](
const char*
name)
const;
92 virtual const xml_attr* first_attr(
void)
const = 0;
99 virtual const xml_attr* next_attr(
void)
const = 0;
107 virtual xml_node& add_attr(
const char*
name,
const char* value) = 0;
139 #if defined(_WIN32) || defined(_WIN64) 152 virtual xml_node& set_text(
const char* str,
bool append =
false) = 0;
169 #if defined(_WIN32) || defined(_WIN64) 172 xml_node& set_text(
long long int number);
183 bool return_child =
false) = 0;
202 xml_node& add_child(
const char* tag,
bool return_child =
false,
203 const char* str = NULL);
213 xml_node& add_child(
const char* tag,
const char* txt,
214 bool return_child =
false);
224 #if defined(_WIN32) || defined(_WIN64) 225 xml_node& add_child(
const char* tag, __int64 number,
226 bool return_child =
false);
228 xml_node& add_child(
const char* tag,
long long int number,
229 bool return_child =
false);
243 size_t off = 0,
size_t len = 0,
bool return_child =
false);
249 virtual xml_node& get_parent(
void)
const = 0;
262 virtual int detach(
void) = 0;
268 virtual xml_node* first_child(
void) = 0;
274 virtual xml_node* next_child(
void) = 0;
280 virtual int depth(
void)
const = 0;
286 virtual bool is_root(
void)
const = 0;
292 virtual int children_count(
void)
const = 0;
306 xml& get_xml(
void)
const;
338 xml(
size_t dbuf_nblock = 2,
size_t dbuf_capacity = 100);
346 virtual xml& ignore_slash(
bool on) = 0;
353 virtual xml& xml_decode(
bool on) = 0;
360 virtual xml& xml_encode(
bool on) = 0;
367 virtual xml& xml_multi_root(
bool on) = 0;
378 virtual const char* update(
const char* data) = 0;
386 virtual bool complete(
const char* root_tag) = 0;
393 virtual void reset(
void) = 0;
400 virtual const string& getText(
void);
410 virtual const std::vector<xml_node*>&
411 getElementsByTagName(
const char* tag)
const = 0;
418 virtual xml_node* getFirstElementByTag(
const char* tag)
const = 0;
432 virtual const std::vector<xml_node*>&
433 getElementsByTags(
const char* tags)
const = 0;
444 virtual xml_node* getFirstElementByTags(
const char* tags)
const = 0;
454 virtual const std::vector<xml_node*>&
455 getElementsByName(
const char* value)
const = 0;
464 virtual const std::vector<xml_node*>& getElementsByAttr(
465 const char*
name,
const char* value)
const = 0;
473 virtual xml_node* getElementById(
const char*
id)
const = 0;
483 virtual xml_node& create_node(
const char* tag,
484 const char* txt = NULL) = 0;
497 size_t off = 0,
size_t len = 0) = 0;
507 #if defined(_WIN32) || defined(_WIN64) 508 xml_node& create_node(
const char* tag, __int64 number);
510 xml_node& create_node(
const char* tag,
long long int number);
518 virtual xml_node& get_root(
void) = 0;
526 virtual xml_node* first_node(
void) = 0;
534 virtual xml_node* next_node(
void) = 0;
540 virtual void build_xml(
string& out)
const { (void) out; };
547 virtual const char* to_string(
size_t* len = NULL)
const = 0;
553 virtual size_t space(
void)
const = 0;
558 virtual void space_clear(
void) = 0;
564 virtual size_t node_count(
void)
const = 0;
570 virtual size_t attr_count(
void)
const = 0;
575 virtual int push_pop(
const char* in,
size_t len,
576 string* out,
size_t max = 0);
577 virtual int pop_end(
string* out,
size_t max = 0);
578 virtual void clear(
void);
HTTP_API void const char * name
std::vector< xml_node * > nodes_tmp_
std::vector< xml_attr * > attrs_tmp_
std::vector< xml_node * > elements_
virtual void build_xml(string &out) const