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

Function xmlShellBase

ThirdParty/libxml2/vtklibxml2/debugXML.c:2029–2051  ·  view source on GitHub ↗

* xmlShellBase: * @ctxt: the shell context * @arg: unused * @node: a node * @node2: unused * * Implements the XML shell function "base" * dumps the current XML base of the node * * Returns 0 */

Source from the content-addressed store, hash-verified

2027 * Returns 0
2028 */
2029int
2030xmlShellBase(xmlShellCtxtPtr ctxt,
2031 char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
2032 xmlNodePtr node2 ATTRIBUTE_UNUSED)
2033{
2034 xmlChar *base;
2035 if (!ctxt)
2036 return 0;
2037 if (node == NULL) {
2038 fprintf(ctxt->output, "NULL\n");
2039 return (0);
2040 }
2041
2042 base = xmlNodeGetBase(node->doc, node);
2043
2044 if (base == NULL) {
2045 fprintf(ctxt->output, " No base found !!!\n");
2046 } else {
2047 fprintf(ctxt->output, "%s\n", base);
2048 xmlFree(base);
2049 }
2050 return (0);
2051}
2052
2053#ifdef LIBXML_TREE_ENABLED
2054/**

Callers 1

xmlShellFunction · 0.85

Calls 2

fprintfFunction · 0.85
xmlNodeGetBaseFunction · 0.85

Tested by

no test coverage detected