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

Function xmlSaveTree

ThirdParty/libxml2/vtklibxml2/xmlsave.c:2144–2165  ·  view source on GitHub ↗

* xmlSaveTree: * @ctxt: a document saving context * @cur: the top node of the subtree to save * * Save a subtree starting at the node parameter to a saving context * TODO: The function is not fully implemented yet as it does not return the * byte count but 0 instead * * Returns the number of byte written or -1 in case of error */

Source from the content-addressed store, hash-verified

2142 * Returns the number of byte written or -1 in case of error
2143 */
2144long
2145xmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr cur)
2146{
2147 long ret = 0;
2148
2149 if ((ctxt == NULL) || (cur == NULL)) return(-1);
2150#ifdef LIBXML_HTML_ENABLED
2151 if (ctxt->options & XML_SAVE_XHTML) {
2152 xhtmlNodeDumpOutput(ctxt, cur);
2153 return(ret);
2154 }
2155 if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) &&
2156 (cur->doc->type == XML_HTML_DOCUMENT_NODE) &&
2157 ((ctxt->options & XML_SAVE_AS_XML) == 0)) ||
2158 (ctxt->options & XML_SAVE_AS_HTML)) {
2159 htmlNodeDumpOutputInternal(ctxt, cur);
2160 return(ret);
2161 }
2162#endif
2163 xmlNodeDumpOutputInternal(ctxt, cur);
2164 return(ret);
2165}
2166
2167/**
2168 * xmlSaveNotationDecl:

Callers 6

xmlDumpElementDeclFunction · 0.85
xmlDumpElementDeclScanFunction · 0.85
xmlDumpAttributeDeclFunction · 0.85
xmlDumpAttributeDeclScanFunction · 0.85
xmlDumpEntityDeclFunction · 0.85
xmlDumpEntityDeclScanFunction · 0.85

Calls 3

xhtmlNodeDumpOutputFunction · 0.85

Tested by

no test coverage detected