* xmlTextWriterWriteVFormatAttribute: * @writer: the xmlTextWriterPtr * @name: attribute name * @format: format string (see printf) * @argptr: pointer to the first member of the variable argument list. * * Write a formatted xml attribute. * * Returns the bytes written (may be 0 because of buffering) or -1 in case of error */
| 1984 | * Returns the bytes written (may be 0 because of buffering) or -1 in case of error |
| 1985 | */ |
| 1986 | int |
| 1987 | xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer, |
| 1988 | const xmlChar * name, |
| 1989 | const char *format, va_list argptr) |
| 1990 | { |
| 1991 | int rc; |
| 1992 | xmlChar *buf; |
| 1993 | |
| 1994 | if (writer == NULL) |
| 1995 | return -1; |
| 1996 | |
| 1997 | buf = xmlTextWriterVSprintf(format, argptr); |
| 1998 | if (buf == NULL) |
| 1999 | return -1; |
| 2000 | |
| 2001 | rc = xmlTextWriterWriteAttribute(writer, name, buf); |
| 2002 | |
| 2003 | xmlFree(buf); |
| 2004 | return rc; |
| 2005 | } |
| 2006 | |
| 2007 | /** |
| 2008 | * xmlTextWriterWriteAttribute: |
no test coverage detected