void KoXmlWriter::addTextNode( const char* cstr ) { prepareForTextNode(); char* escaped = escapeForXML( cstr, -1 ); writeCString( escaped ); if(escaped != m_escapeBuffer) delete[] escaped; }
void KoXmlWriter::addTextNode(const QByteArray& cstr) { // Same as the const char* version below, but here we know the size prepareForTextNode(); char* escaped = escapeForXML(cstr.constData(), cstr.size()); writeCString(escaped); if (escaped != d->escapeBuffer) delete[] escaped; }
void KoXmlWriter::addAttribute( const char* attrName, const char* value ) { writeChar( ' ' ); writeCString( attrName ); writeCString("=\""); char* escaped = escapeForXML( value, -1 ); writeCString( escaped ); if(escaped != m_escapeBuffer) delete[] escaped; writeChar( '"' ); }
void KoXmlWriter::addAttribute(const char* attrName, const QByteArray& value) { // Same as the const char* one, but here we know the size writeChar(' '); writeCString(attrName); writeCString("=\""); char* escaped = escapeForXML(value.constData(), value.size()); writeCString(escaped); if (escaped != d->escapeBuffer) delete[] escaped; writeChar('"'); }