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

Function htmlNodeDumpFileFormat

ThirdParty/libxml2/vtklibxml2/HTMLtree.c:497–520  ·  view source on GitHub ↗

* htmlNodeDumpFileFormat: * @out: the FILE pointer * @doc: the document * @cur: the current node * @encoding: the document encoding * @format: should formatting spaces been added * * Dump an HTML node, recursive behaviour,children are printed too. * * TODO: if encoding == NULL try to save in the doc encoding * * returns: the number of byte written or -1 in case of failure. */

Source from the content-addressed store, hash-verified

495 * returns: the number of byte written or -1 in case of failure.
496 */
497int
498htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
499 xmlNodePtr cur, const char *encoding, int format) {
500 xmlOutputBufferPtr buf;
501 xmlCharEncodingHandlerPtr handler;
502 int ret;
503
504 xmlInitParser();
505
506 /*
507 * save the content to a temp buffer.
508 */
509 handler = htmlFindOutputEncoder(encoding);
510 buf = xmlOutputBufferCreateFile(out, handler);
511 if (buf == NULL) {
512 xmlCharEncCloseFunc(handler);
513 return(0);
514 }
515
516 htmlNodeDumpFormatOutput(buf, doc, cur, NULL, format);
517
518 ret = xmlOutputBufferClose(buf);
519 return(ret);
520}
521
522/**
523 * htmlNodeDumpFile:

Callers 1

htmlNodeDumpFileFunction · 0.85

Calls 6

xmlInitParserFunction · 0.85
htmlFindOutputEncoderFunction · 0.85
xmlCharEncCloseFuncFunction · 0.85
htmlNodeDumpFormatOutputFunction · 0.85
xmlOutputBufferCloseFunction · 0.85

Tested by

no test coverage detected