MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / xmlShellBase

Function xmlShellBase

Externals/LibXML/debugXML.c:2040–2062  ·  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

2038 * Returns 0
2039 */
2040int
2041xmlShellBase(xmlShellCtxtPtr ctxt,
2042 char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
2043 xmlNodePtr node2 ATTRIBUTE_UNUSED)
2044{
2045 xmlChar *base;
2046 if (!ctxt)
2047 return 0;
2048 if (node == NULL) {
2049 fprintf(ctxt->output, "NULL\n");
2050 return (0);
2051 }
2052
2053 base = xmlNodeGetBase(node->doc, node);
2054
2055 if (base == NULL) {
2056 fprintf(ctxt->output, " No base found !!!\n");
2057 } else {
2058 fprintf(ctxt->output, "%s\n", base);
2059 xmlFree(base);
2060 }
2061 return (0);
2062}
2063
2064#ifdef LIBXML_TREE_ENABLED
2065/**

Callers 2

test_xmlShellBaseFunction · 0.85
xmlShellFunction · 0.85

Calls 1

xmlNodeGetBaseFunction · 0.85

Tested by 1

test_xmlShellBaseFunction · 0.68