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

Function htmlNodeDump

ThirdParty/libxml2/vtklibxml2/HTMLtree.c:460–481  ·  view source on GitHub ↗

* htmlNodeDump: * @buf: the HTML buffer output * @doc: the document * @cur: the current node * * Dump an HTML node, recursive behaviour,children are printed too, * and formatting returns are added. * * Returns the number of byte written or -1 in case of error */

Source from the content-addressed store, hash-verified

458 * Returns the number of byte written or -1 in case of error
459 */
460int
461htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
462 xmlBufPtr buffer;
463 size_t ret;
464
465 if ((buf == NULL) || (cur == NULL))
466 return(-1);
467
468 xmlInitParser();
469 buffer = xmlBufFromBuffer(buf);
470 if (buffer == NULL)
471 return(-1);
472
473 xmlBufSetAllocationScheme(buffer, XML_BUFFER_ALLOC_DOUBLEIT);
474 ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1);
475
476 xmlBufBackToBuffer(buffer);
477
478 if (ret > INT_MAX)
479 return(-1);
480 return((int) ret);
481}
482
483/**
484 * htmlNodeDumpFileFormat:

Callers

nothing calls this directly

Calls 5

xmlInitParserFunction · 0.85
xmlBufFromBufferFunction · 0.85
htmlBufNodeDumpFormatFunction · 0.85
xmlBufBackToBufferFunction · 0.85

Tested by

no test coverage detected