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

Function xmlXPathDebugDumpNode

ThirdParty/libxml2/vtklibxml2/xpath.c:1097–1120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1095
1096#ifdef LIBXML_DEBUG_ENABLED
1097static void
1098xmlXPathDebugDumpNode(FILE *output, xmlNodePtr cur, int depth) {
1099 int i;
1100 char shift[100];
1101
1102 for (i = 0;((i < depth) && (i < 25));i++)
1103 shift[2 * i] = shift[2 * i + 1] = ' ';
1104 shift[2 * i] = shift[2 * i + 1] = 0;
1105 if (cur == NULL) {
1106 fprintf(output, "%s", shift);
1107 fprintf(output, "Node is NULL !\n");
1108 return;
1109
1110 }
1111
1112 if ((cur->type == XML_DOCUMENT_NODE) ||
1113 (cur->type == XML_HTML_DOCUMENT_NODE)) {
1114 fprintf(output, "%s", shift);
1115 fprintf(output, " /\n");
1116 } else if (cur->type == XML_ATTRIBUTE_NODE)
1117 xmlDebugDumpAttr(output, (xmlAttrPtr)cur, depth);
1118 else
1119 xmlDebugDumpOneNode(output, cur, depth);
1120}
1121static void
1122xmlXPathDebugDumpNodeList(FILE *output, xmlNodePtr cur, int depth) {
1123 xmlNodePtr tmp;

Callers 2

xmlXPathDebugDumpNodeSetFunction · 0.85
xmlXPathDebugDumpObjectFunction · 0.85

Calls 3

fprintfFunction · 0.85
xmlDebugDumpAttrFunction · 0.85
xmlDebugDumpOneNodeFunction · 0.85

Tested by

no test coverage detected