libidav/xml.c

changeset 338
c7f3fe4abdb2
parent 331
9ca1e4706acc
child 361
b6f2462ee055
equal deleted inserted replaced
337:d7bda914d120 338:c7f3fe4abdb2
143 } else { 143 } else {
144 return NULL; 144 return NULL;
145 } 145 }
146 } 146 }
147 147
148 DavBool dav_xml_isstring(DavXmlNode *node) {
149 if(node && node->type == DAV_XML_TEXT && !node->next) {
150 return TRUE;
151 } else {
152 return FALSE;
153 }
154 }
155
148 DavXmlNode* dav_text_node(DavSession *sn, char *text) { 156 DavXmlNode* dav_text_node(DavSession *sn, char *text) {
149 UcxMempool *mp = sn->mp; 157 UcxMempool *mp = sn->mp;
150 DavXmlNode *newxn = ucx_mempool_calloc(mp, 1, sizeof(DavXmlNode)); 158 DavXmlNode *newxn = ucx_mempool_calloc(mp, 1, sizeof(DavXmlNode));
151 newxn->type = DAV_XML_TEXT; 159 newxn->type = DAV_XML_TEXT;
152 sstr_t content = sstrdup_a(mp->allocator, sstr(text)); 160 sstr_t content = sstrdup_a(mp->allocator, sstr(text));

mercurial