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

Function xmlCtxtDumpOneNode

ThirdParty/libxml2/vtklibxml2/debugXML.c:861–1034  ·  view source on GitHub ↗

* xmlCtxtDumpOneNode: * @output: the FILE * for the output * @node: the node * @depth: the indentation level. * * Dumps debug information for the element node, it is not recursive */

Source from the content-addressed store, hash-verified

859 * Dumps debug information for the element node, it is not recursive
860 */
861static void
862xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
863{
864 if (node == NULL) {
865 if (!ctxt->check) {
866 xmlCtxtDumpSpaces(ctxt);
867 fprintf(ctxt->output, "node is NULL\n");
868 }
869 return;
870 }
871 ctxt->node = node;
872
873 switch (node->type) {
874 case XML_ELEMENT_NODE:
875 if (!ctxt->check) {
876 xmlCtxtDumpSpaces(ctxt);
877 fprintf(ctxt->output, "ELEMENT ");
878 if ((node->ns != NULL) && (node->ns->prefix != NULL)) {
879 xmlCtxtDumpString(ctxt, node->ns->prefix);
880 fprintf(ctxt->output, ":");
881 }
882 xmlCtxtDumpString(ctxt, node->name);
883 fprintf(ctxt->output, "\n");
884 }
885 break;
886 case XML_ATTRIBUTE_NODE:
887 if (!ctxt->check)
888 xmlCtxtDumpSpaces(ctxt);
889 fprintf(ctxt->output, "Error, ATTRIBUTE found here\n");
890 xmlCtxtGenericNodeCheck(ctxt, node);
891 return;
892 case XML_TEXT_NODE:
893 if (!ctxt->check) {
894 xmlCtxtDumpSpaces(ctxt);
895 if (node->name == (const xmlChar *) xmlStringTextNoenc)
896 fprintf(ctxt->output, "TEXT no enc");
897 else
898 fprintf(ctxt->output, "TEXT");
899 if (ctxt->options & DUMP_TEXT_TYPE) {
900 if (node->content == (xmlChar *) &(node->properties))
901 fprintf(ctxt->output, " compact\n");
902 else if (xmlDictOwns(ctxt->dict, node->content) == 1)
903 fprintf(ctxt->output, " interned\n");
904 else
905 fprintf(ctxt->output, "\n");
906 } else
907 fprintf(ctxt->output, "\n");
908 }
909 break;
910 case XML_CDATA_SECTION_NODE:
911 if (!ctxt->check) {
912 xmlCtxtDumpSpaces(ctxt);
913 fprintf(ctxt->output, "CDATA_SECTION\n");
914 }
915 break;
916 case XML_ENTITY_REF_NODE:
917 if (!ctxt->check) {
918 xmlCtxtDumpSpaces(ctxt);

Callers 2

xmlCtxtDumpNodeFunction · 0.85
xmlDebugDumpOneNodeFunction · 0.85

Calls 14

xmlCtxtDumpSpacesFunction · 0.85
fprintfFunction · 0.85
xmlCtxtDumpStringFunction · 0.85
xmlCtxtGenericNodeCheckFunction · 0.85
xmlDictOwnsFunction · 0.85
xmlCtxtDumpDtdNodeFunction · 0.85
xmlCtxtDumpElemDeclFunction · 0.85
xmlCtxtDumpAttrDeclFunction · 0.85
xmlCtxtDumpEntityDeclFunction · 0.85
xmlCtxtDumpNamespaceFunction · 0.85
xmlCtxtDumpNamespaceListFunction · 0.85
xmlCtxtDumpAttrListFunction · 0.85

Tested by

no test coverage detected