MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlAttrDumpOutput

Function xmlAttrDumpOutput

ThirdParty/libxml2/vtklibxml2/xmlsave.c:991–1022  ·  view source on GitHub ↗

* xmlAttrDumpOutput: * @buf: the XML buffer output * @cur: the attribute pointer * * Dump an XML attribute */

Source from the content-addressed store, hash-verified

989 * Dump an XML attribute
990 */
991static void
992xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
993 xmlOutputBufferPtr buf;
994
995 if (cur == NULL) return;
996 buf = ctxt->buf;
997 if (buf == NULL) return;
998 if (ctxt->format == 2)
999 xmlOutputBufferWriteWSNonSig(ctxt, 2);
1000 else
1001 xmlOutputBufferWrite(buf, 1, " ");
1002 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
1003 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
1004 xmlOutputBufferWrite(buf, 1, ":");
1005 }
1006 xmlOutputBufferWriteString(buf, (const char *)cur->name);
1007 xmlOutputBufferWrite(buf, 2, "=\"");
1008#ifdef LIBXML_HTML_ENABLED
1009 if ((ctxt->options & XML_SAVE_XHTML) &&
1010 (cur->ns == NULL) &&
1011 ((cur->children == NULL) ||
1012 (cur->children->content == NULL) ||
1013 (cur->children->content[0] == 0)) &&
1014 (htmlIsBooleanAttr(cur->name))) {
1015 xmlOutputBufferWriteString(buf, (const char *) cur->name);
1016 } else
1017#endif
1018 {
1019 xmlAttrSerializeContent(buf, cur);
1020 }
1021 xmlOutputBufferWrite(buf, 1, "\"");
1022}
1023
1024#ifdef LIBXML_HTML_ENABLED
1025/**

Callers 3

xhtmlAttrListDumpOutputFunction · 0.85
xhtmlNodeDumpOutputFunction · 0.85

Calls 5

xmlOutputBufferWriteFunction · 0.85
htmlIsBooleanAttrFunction · 0.85
xmlAttrSerializeContentFunction · 0.85

Tested by

no test coverage detected