* xmlTextWriterWriteComment: * @writer: the xmlTextWriterPtr * @content: comment string * * Write an xml comment. * * Returns the bytes written (may be 0 because of buffering) or -1 in case of error */
| 914 | * Returns the bytes written (may be 0 because of buffering) or -1 in case of error |
| 915 | */ |
| 916 | int |
| 917 | xmlTextWriterWriteComment(xmlTextWriterPtr writer, const xmlChar * content) |
| 918 | { |
| 919 | int count; |
| 920 | int sum; |
| 921 | |
| 922 | sum = 0; |
| 923 | count = xmlTextWriterStartComment(writer); |
| 924 | if (count < 0) |
| 925 | return -1; |
| 926 | sum += count; |
| 927 | count = xmlTextWriterWriteString(writer, content); |
| 928 | if (count < 0) |
| 929 | return -1; |
| 930 | sum += count; |
| 931 | count = xmlTextWriterEndComment(writer); |
| 932 | if (count < 0) |
| 933 | return -1; |
| 934 | sum += count; |
| 935 | |
| 936 | return sum; |
| 937 | } |
| 938 | |
| 939 | /** |
| 940 | * xmlTextWriterStartElement: |
no test coverage detected