* xmlShellPrintNodeCtxt: * @ctxt : a non-null shell context * @node : a non-null node to print to the output FILE * * Print node to the output FILE */
| 1870 | * Print node to the output FILE |
| 1871 | */ |
| 1872 | static void |
| 1873 | xmlShellPrintNodeCtxt(xmlShellCtxtPtr ctxt,xmlNodePtr node) |
| 1874 | { |
| 1875 | FILE *fp; |
| 1876 | |
| 1877 | if (!node) |
| 1878 | return; |
| 1879 | if (ctxt == NULL) |
| 1880 | fp = stdout; |
| 1881 | else |
| 1882 | fp = ctxt->output; |
| 1883 | |
| 1884 | if (node->type == XML_DOCUMENT_NODE) |
| 1885 | xmlDocDump(fp, (xmlDocPtr) node); |
| 1886 | else if (node->type == XML_ATTRIBUTE_NODE) |
| 1887 | xmlDebugDumpAttrList(fp, (xmlAttrPtr) node, 0); |
| 1888 | else |
| 1889 | xmlElemDump(fp, node->doc, node); |
| 1890 | |
| 1891 | fprintf(fp, "\n"); |
| 1892 | } |
| 1893 | |
| 1894 | /** |
| 1895 | * xmlShellPrintNode: |
no test coverage detected