94 |
|
#define ezxml_name(xml) ((xml) ? xml->name : NULL) |
95 |
|
|
96 |
|
/* returns the given tag's character content or empty string if none */ |
97 |
< |
#define ezxml_txt(xml) ((xml) ? xml->txt : "") |
97 |
> |
char *ezxml_txt(ezxml_t xml); |
98 |
|
|
99 |
|
/* returns the value of the requested tag attribute, or NULL if not found */ |
100 |
|
const char *ezxml_attr(ezxml_t xml, const char *attr); |
141 |
|
/* wrapper for ezxml_set_txt() that strdup()s txt */ |
142 |
|
#define ezxml_set_txt_d(xml, txt) \ |
143 |
|
ezxml_set_flag(ezxml_set_txt(xml, strdup(txt)), EZXML_TXTM) |
144 |
+ |
|
145 |
+ |
/* add text to the current character content, allocating memory as needed */ |
146 |
+ |
ezxml_t ezxml_add_txt(ezxml_t xml, const char *txt); |
147 |
|
|
148 |
|
/* Sets the given tag attribute or adds a new attribute if not found. A value */ |
149 |
|
/* of NULL will remove the specified attribute. Returns the tag given. */ |