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

Function xmlAttrSerializeContent

ThirdParty/libxml2/vtklibxml2/xmlsave.c:387–410  ·  view source on GitHub ↗

* * * Dumping XML tree content to a simple buffer * * * ************************************************************************/ * xmlAttrSerializeContent: * @buf: the XML buffer output * @doc: the document * @attr: the attribute pointer * * Serialize the attribute in the buffer */

Source from the content-addressed store, hash-verified

385 * Serialize the attribute in the buffer
386 */
387static void
388xmlAttrSerializeContent(xmlOutputBufferPtr buf, xmlAttrPtr attr)
389{
390 xmlNodePtr children;
391
392 children = attr->children;
393 while (children != NULL) {
394 switch (children->type) {
395 case XML_TEXT_NODE:
396 xmlBufAttrSerializeTxtContent(buf, attr->doc,
397 children->content);
398 break;
399 case XML_ENTITY_REF_NODE:
400 xmlOutputBufferWrite(buf, 1, "&");
401 xmlOutputBufferWriteString(buf, (const char *) children->name);
402 xmlOutputBufferWrite(buf, 1, ";");
403 break;
404 default:
405 /* should not happen unless we have a badly built tree */
406 break;
407 }
408 children = children->next;
409 }
410}
411
412/**
413 * xmlBufDumpNotationDecl:

Callers 2

xmlAttrDumpOutputFunction · 0.85
xhtmlAttrListDumpOutputFunction · 0.85

Calls 3

xmlOutputBufferWriteFunction · 0.85

Tested by

no test coverage detected