* xmlTextWriterWriteVFormatElementNS: * @writer: the xmlTextWriterPtr * @prefix: namespace prefix * @name: element local name * @namespaceURI: namespace URI * @format: format string (see printf) * @argptr: pointer to the first member of the variable argument list. * * Write a formatted xml element with namespace support. * * Returns the bytes written (may be 0 because of buffering)
| 2289 | * Returns the bytes written (may be 0 because of buffering) or -1 in case of error |
| 2290 | */ |
| 2291 | int |
| 2292 | xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer, |
| 2293 | const xmlChar * prefix, |
| 2294 | const xmlChar * name, |
| 2295 | const xmlChar * namespaceURI, |
| 2296 | const char *format, va_list argptr) |
| 2297 | { |
| 2298 | int rc; |
| 2299 | xmlChar *buf; |
| 2300 | |
| 2301 | if (writer == NULL) |
| 2302 | return -1; |
| 2303 | |
| 2304 | buf = xmlTextWriterVSprintf(format, argptr); |
| 2305 | if (buf == NULL) |
| 2306 | return -1; |
| 2307 | |
| 2308 | rc = xmlTextWriterWriteElementNS(writer, prefix, name, namespaceURI, |
| 2309 | buf); |
| 2310 | |
| 2311 | xmlFree(buf); |
| 2312 | return rc; |
| 2313 | } |
| 2314 | |
| 2315 | /** |
| 2316 | * xmlTextWriterWriteElementNS: |
no test coverage detected