* 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 */
| 2027 | * Returns 0 |
| 2028 | */ |
| 2029 | int |
| 2030 | xmlShellBase(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 | /** |
no test coverage detected