struct xml_writer_private * p = w->priv;
if (xmlTextWriterStartElement(p->xw, BAD_CAST tag) < 0)
- LLOG_WARN("cannot start '%s' element\n", tag);
+ LLOG_WARNX("cannot start '%s' element", tag);
if ( descr && (strlen(descr) > 0) ) {
if (xmlTextWriterWriteFormatAttribute(p->xw, BAD_CAST "label", "%s", descr) < 0)
- LLOG_WARN("cannot add attribute 'label' to element %s\n", tag);
+ LLOG_WARNX("cannot add attribute 'label' to element %s", tag);
}
}
struct xml_writer_private * p = w->priv;
if (xmlTextWriterWriteFormatAttribute(p->xw, BAD_CAST tag, "%s", value) < 0)
- LLOG_WARN("cannot add attribute %s with value %s\n", tag, value);
+ LLOG_WARNX("cannot add attribute %s with value %s", tag, value);
}
void xml_data(struct writer * w, const char * data) {
struct xml_writer_private * p = w->priv;
if (xmlTextWriterWriteString(p->xw, BAD_CAST data) < 0 )
- LLOG_WARN("cannot add '%s' as data to element\n", data);
+ LLOG_WARNX("cannot add '%s' as data to element", data);
}
void xml_end(struct writer * w) {
struct xml_writer_private * p = w->priv;
if (xmlTextWriterEndElement(p->xw) < 0 )
- LLOG_WARN("cannot end element\n");
+ LLOG_WARNX("cannot end element\n");
}
#define MY_ENCODING "UTF-8"
int failed = 0;
if (xmlTextWriterEndDocument(p->xw) < 0 ) {
- LLOG_WARN("cannot finish document\n");
+ LLOG_WARNX("cannot finish document");
failed = 1;
}