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

Function xmlLsOneNode

ThirdParty/libxml2/vtklibxml2/debugXML.c:1641–1765  ·  view source on GitHub ↗

* xmlLsOneNode: * @output: the FILE * for the output * @node: the node to dump * * Dump to @output the type and name of @node. */

Source from the content-addressed store, hash-verified

1639 * Dump to @output the type and name of @node.
1640 */
1641void
1642xmlLsOneNode(FILE *output, xmlNodePtr node) {
1643 if (output == NULL) return;
1644 if (node == NULL) {
1645 fprintf(output, "NULL\n");
1646 return;
1647 }
1648 switch (node->type) {
1649 case XML_ELEMENT_NODE:
1650 fprintf(output, "-");
1651 break;
1652 case XML_ATTRIBUTE_NODE:
1653 fprintf(output, "a");
1654 break;
1655 case XML_TEXT_NODE:
1656 fprintf(output, "t");
1657 break;
1658 case XML_CDATA_SECTION_NODE:
1659 fprintf(output, "C");
1660 break;
1661 case XML_ENTITY_REF_NODE:
1662 fprintf(output, "e");
1663 break;
1664 case XML_ENTITY_NODE:
1665 fprintf(output, "E");
1666 break;
1667 case XML_PI_NODE:
1668 fprintf(output, "p");
1669 break;
1670 case XML_COMMENT_NODE:
1671 fprintf(output, "c");
1672 break;
1673 case XML_DOCUMENT_NODE:
1674 fprintf(output, "d");
1675 break;
1676 case XML_HTML_DOCUMENT_NODE:
1677 fprintf(output, "h");
1678 break;
1679 case XML_DOCUMENT_TYPE_NODE:
1680 fprintf(output, "T");
1681 break;
1682 case XML_DOCUMENT_FRAG_NODE:
1683 fprintf(output, "F");
1684 break;
1685 case XML_NOTATION_NODE:
1686 fprintf(output, "N");
1687 break;
1688 case XML_NAMESPACE_DECL:
1689 fprintf(output, "n");
1690 break;
1691 default:
1692 fprintf(output, "?");
1693 }
1694 if (node->type != XML_NAMESPACE_DECL) {
1695 if (node->properties != NULL)
1696 fprintf(output, "a");
1697 else
1698 fprintf(output, "-");

Callers 1

xmlShellListFunction · 0.85

Calls 3

fprintfFunction · 0.85
xmlLsCountNodeFunction · 0.85
xmlDebugDumpStringFunction · 0.85

Tested by

no test coverage detected