15 #ifdef HAVE_SYS_TIME_H 22 #ifdef HAVE_SYS_TIMEB_H 26 #ifdef HAVE_SYS_TYPES_H 29 #ifdef HAVE_SYS_STAT_H 38 #ifdef HAVE_SYS_MMAN_H 42 #define MAP_FAILED ((void *) -1) 48 #ifdef HAVE_LIBREADLINE 49 #include <readline/readline.h> 50 #ifdef HAVE_LIBHISTORY 51 #include <readline/history.h> 64 #ifdef LIBXML_XINCLUDE_ENABLED 67 #ifdef LIBXML_CATALOG_ENABLED 72 #ifdef LIBXML_SCHEMATRON_ENABLED 75 #ifdef LIBXML_SCHEMAS_ENABLED 79 #ifdef LIBXML_PATTERN_ENABLED 82 #ifdef LIBXML_C14N_ENABLED 85 #ifdef LIBXML_OUTPUT_ENABLED 89 #ifndef XML_XML_DEFAULT_CATALOG 90 #define XML_XML_DEFAULT_CATALOG "file: 106 #ifdef LIBXML_DEBUG_ENABLED 107 static int shell = 0;
108 static int debugent = 0;
112 #ifdef LIBXML_TREE_ENABLED 121 #ifdef LIBXML_OUTPUT_ENABLED 125 static int oldout = 0;
127 #ifdef LIBXML_VALID_ENABLED 128 static int valid = 0;
129 static int postvalid = 0;
130 static char * dtdvalid =
NULL;
131 static char * dtdvalidfpi =
NULL;
133 #ifdef LIBXML_SCHEMAS_ENABLED 134 static char * relaxng =
NULL;
135 static xmlRelaxNGPtr relaxngschemas =
NULL;
137 static xmlSchemaPtr wxschemas =
NULL;
139 #ifdef LIBXML_SCHEMATRON_ENABLED 140 static char * schematron =
NULL;
141 static xmlSchematronPtr wxschematron =
NULL;
145 #if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED) 147 static int xmlout = 0;
150 #if defined(LIBXML_HTML_ENABLED) 151 static int nodefdtd = 0;
153 #ifdef LIBXML_PUSH_ENABLED 155 static int pushsize = 4096;
162 #ifdef LIBXML_XINCLUDE_ENABLED 163 static int xinclude = 0;
172 #ifdef LIBXML_CATALOG_ENABLED 173 static int catalogs = 0;
174 static int nocatalogs = 0;
176 #ifdef LIBXML_C14N_ENABLED 177 static int canonical = 0;
178 static int canonical_11 = 0;
179 static int exc_canonical = 0;
181 #ifdef LIBXML_READER_ENABLED 183 static int walker = 0;
184 #ifdef LIBXML_PATTERN_ENABLED 186 static xmlPatternPtr patternc =
NULL;
187 static xmlStreamCtxtPtr patstream =
NULL;
192 #ifdef LIBXML_SAX1_ENABLED 195 #ifdef LIBXML_XPATH_ENABLED 196 static const char *xpathquery =
NULL;
209 # define PATH_SEPARATOR ';' 211 # define PATH_SEPARATOR ':' 253 const char *lastsegment = URL;
254 const char *iter = URL;
259 lastsegment = iter + 1;
281 "Loaded URL=\"%s\" ID=\"%s\"\n",
282 URL ? URL :
"(null)",
294 if (newURL !=
NULL) {
304 "Loaded URL=\"%s\" ID=\"%s\"\n",
319 warning(ctxt,
"failed to load external entity \"%s\"\n", URL);
321 warning(ctxt,
"failed to load external entity \"%s\"\n",
ID);
395 #ifndef HAVE_GETTIMEOFDAY 396 #ifdef HAVE_SYS_TIMEB_H 397 #ifdef HAVE_SYS_TIME_H 401 my_gettimeofday(
struct timeval *tvp,
void *tzp)
403 struct timeb timebuffer;
407 tvp->
tv_sec = timebuffer.time;
408 tvp->
tv_usec = timebuffer.millitm * 1000
L;
412 #define HAVE_GETTIMEOFDAY 1 413 #define gettimeofday my_gettimeofday 420 #if defined(HAVE_GETTIMEOFDAY) 446 msec += (
end.tv_usec -
begin.tv_usec) / 1000;
448 #ifndef HAVE_STDARG_H 449 #error "endTimer required stdarg functions" 457 #elif defined(HAVE_TIME_H) 463 #ifndef CLOCKS_PER_SEC 464 #define CLOCKS_PER_SEC 100 482 #ifndef HAVE_STDARG_H 483 #error "endTimer required stdarg functions" 503 endTimer(
char *
format, ...)
560 if (
input->filename) {
591 while ((
n++ < 80) && (
cur >
base) && (*
cur !=
'\n') && (*
cur !=
'\r'))
593 if ((*
cur ==
'\n') || (*
cur ==
'\r'))
cur++;
596 while ((*
cur != 0) && (*
cur !=
'\n') && (*
cur !=
'\r') && (
n < 79)) {
599 (
unsigned char) *
cur++);
605 while ((*
cur ==
'\n') || (*
cur ==
'\r'))
608 while ((
cur !=
base) && (
n++ < 80)) {
704 xmlHTMLValidityError(
void *
ctx,
const char *
msg, ...)
741 xmlHTMLValidityWarning(
void *
ctx,
const char *
msg, ...)
772 #ifdef LIBXML_DEBUG_ENABLED 773 #ifdef LIBXML_XPATH_ENABLED 784 xmlShellReadline(
char *prompt) {
785 #ifdef HAVE_LIBREADLINE 792 if (line_read && *line_read)
793 add_history (line_read);
950 if (ExternalID ==
NULL)
954 if (SystemID ==
NULL)
974 if (ExternalID ==
NULL)
978 if (SystemID ==
NULL)
1008 if (publicId !=
NULL)
1012 if (systemId !=
NULL)
1075 if (publicId ==
NULL)
1077 if (systemId ==
NULL)
1104 if (defaultValue ==
NULL)
1105 fprintf(
stdout,
"SAX.attributeDecl(%s, %s, %d, %d, NULL, ...)\n",
1108 fprintf(
stdout,
"SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n",
1150 (
char *)
name, (
char *) publicId, (
char *) systemId);
1170 if (publicId ==
NULL)
1172 if (systemId ==
NULL)
1174 if (notationName ==
NULL)
1175 notationName = nullstr;
1180 (
char *)
name, (
char *) publicId, (
char *) systemId,
1181 (
char *) notationName);
1291 for (
i = 0;(
i<
len) && (
i < 30);
i++)
1333 for (
i = 0;(
i<
len) && (
i < 30);
i++)
1529 fprintf(
stdout,
"SAX.startElementNs(%s", (
char *) localname);
1540 if (namespaces !=
NULL) {
1541 for (
i = 0;
i < nb_namespaces * 2;
i++) {
1543 if (namespaces[
i] !=
NULL)
1550 if (attributes !=
NULL) {
1551 for (
i = 0;
i < nb_attributes * 5;
i += 5) {
1552 if (attributes[
i + 1] !=
NULL)
1557 (
int)(attributes[
i + 4] - attributes[
i + 3]));
1630 const char *user_data =
"user_data";
1640 #ifdef LIBXML_SAX1_ENABLED 1656 #ifdef LIBXML_SCHEMAS_ENABLED 1657 if (wxschemas !=
NULL) {
1659 xmlSchemaValidCtxtPtr vctxt;
1661 vctxt = xmlSchemaNewValidCtxt(wxschemas);
1663 xmlSchemaValidateSetFilename(vctxt,
filename);
1672 }
else if (
ret > 0) {
1676 fprintf(
stderr,
"%s validation generated an internal error\n",
1681 xmlSchemaFreeValidCtxt(vctxt);
1693 old_sax = ctxt->
sax;
1695 ctxt->
userData = (
void *) user_data;
1697 if (inputStream ==
NULL) {
1715 ctxt->
sax = old_sax;
1725 #ifdef LIBXML_READER_ENABLED 1726 static void processNode(xmlTextReaderPtr
reader) {
1742 xmlTextReaderDepth(
reader),
1746 xmlTextReaderHasValue(
reader));
1753 #ifdef LIBXML_PATTERN_ENABLED 1758 if (
type == XML_READER_TYPE_ELEMENT) {
1760 match = xmlPatternMatch(patternc, xmlTextReaderCurrentNode(
reader));
1763 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) 1764 path = xmlGetNodePath(xmlTextReaderCurrentNode(
reader));
1767 printf(
"Node %s matches pattern %s\n",
1772 if (patstream !=
NULL) {
1775 if (
type == XML_READER_TYPE_ELEMENT) {
1776 ret = xmlStreamPush(patstream,
1777 xmlTextReaderConstLocalName(
reader),
1778 xmlTextReaderConstNamespaceUri(
reader));
1781 xmlFreeStreamCtxt(patstream);
1784 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) 1786 path = xmlGetNodePath(
1787 xmlTextReaderCurrentNode(
reader));
1791 "xmlPatternMatch and xmlStreamPush disagree\n");
1801 if ((
type == XML_READER_TYPE_END_ELEMENT) ||
1802 ((
type == XML_READER_TYPE_ELEMENT) && (
empty))) {
1803 ret = xmlStreamPop(patstream);
1806 xmlFreeStreamCtxt(patstream);
1817 static void streamFile(
char *
filename) {
1844 #ifdef LIBXML_PATTERN_ENABLED 1847 if (patternc ==
NULL) {
1849 "Pattern %s failed to compile\n",
pattern);
1854 if (patternc !=
NULL) {
1855 patstream = xmlPatternGetStreamCtxt(patternc);
1856 if (patstream !=
NULL) {
1860 xmlFreeStreamCtxt(patstream);
1869 #ifdef LIBXML_VALID_ENABLED 1871 xmlTextReaderSetParserProp(
reader, XML_PARSER_VALIDATE, 1);
1875 xmlTextReaderSetParserProp(
reader, XML_PARSER_LOADDTD, 1);
1876 #ifdef LIBXML_SCHEMAS_ENABLED 1877 if (relaxng !=
NULL) {
1881 ret = xmlTextReaderRelaxNGValidate(
reader, relaxng);
1884 "Relax-NG schema %s failed to compile\n", relaxng);
1889 endTimer(
"Compiling the schemas");
1899 "XSD schema %s failed to compile\n",
schema);
1904 endTimer(
"Compiling the schemas");
1926 #ifdef LIBXML_SCHEMAS_ENABLED 1927 if (relaxng !=
NULL)
1928 endTimer(
"Parsing and validating");
1931 #ifdef LIBXML_VALID_ENABLED 1933 endTimer(
"Parsing and validating");
1936 endTimer(
"Parsing");
1939 #ifdef LIBXML_VALID_ENABLED 1941 if (xmlTextReaderIsValid(
reader) != 1) {
1943 "Document %s does not validate\n",
filename);
1948 #ifdef LIBXML_SCHEMAS_ENABLED 1950 if (xmlTextReaderIsValid(
reader) != 1) {
1963 xmlFreeTextReader(
reader);
1972 #ifdef LIBXML_PATTERN_ENABLED 1973 if (patstream !=
NULL) {
1974 xmlFreeStreamCtxt(patstream);
1981 munmap((
char *)
base,
info.st_size);
1991 #ifdef LIBXML_PATTERN_ENABLED 1993 const xmlChar *namespaces[22];
2000 "Document does not have a root element");
2005 namespaces[
i++] =
ns->href;
2008 namespaces[
i++] =
NULL;
2009 namespaces[
i] =
NULL;
2014 if (patternc ==
NULL) {
2016 "Pattern %s failed to compile\n",
pattern);
2021 if (patternc !=
NULL) {
2022 patstream = xmlPatternGetStreamCtxt(patternc);
2023 if (patstream !=
NULL) {
2027 xmlFreeStreamCtxt(patstream);
2033 reader = xmlReaderWalker(doc);
2049 endTimer(
"walking through the doc");
2051 xmlFreeTextReader(
reader);
2057 fprintf(
stderr,
"Failed to crate a reader from the document\n");
2060 #ifdef LIBXML_PATTERN_ENABLED 2061 if (patstream !=
NULL) {
2062 xmlFreeStreamCtxt(patstream);
2069 #ifdef LIBXML_XPATH_ENABLED 2076 static void doXPathDump(xmlXPathObjectPtr
cur) {
2078 case XPATH_NODESET: {
2081 #ifdef LIBXML_OUTPUT_ENABLED 2084 if ((
cur->nodesetval ==
NULL) || (
cur->nodesetval->nodeNr <= 0)) {
2095 for (
i = 0;
i <
cur->nodesetval->nodeNr;
i++) {
2096 node =
cur->nodesetval->nodeTab[
i];
2098 xmlOutputBufferWrite(
buf, 1,
"\n");
2100 xmlOutputBufferClose(
buf);
2102 printf(
"xpath returned %d nodes\n",
cur->nodesetval->nodeNr);
2111 switch (xmlXPathIsInf(
cur->floatval)) {
2119 if (xmlXPathIsNaN(
cur->floatval)) {
2127 printf(
"%s\n", (
const char *)
cur->stringval);
2129 case XPATH_UNDEFINED:
2141 xmlXPathContextPtr ctxt;
2142 xmlXPathObjectPtr
res;
2144 ctxt = xmlXPathNewContext(doc);
2152 xmlXPathFreeContext(ctxt);
2160 xmlXPathFreeObject(
res);
2171 #ifdef LIBXML_TREE_ENABLED 2179 #ifdef LIBXML_TREE_ENABLED 2187 xmlDocSetRootElement(doc,
n);
2191 #ifdef LIBXML_HTML_ENABLED 2192 #ifdef LIBXML_PUSH_ENABLED 2193 else if ((html) && (
push)) {
2199 #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) 2201 #elif defined(__OS400__) 2210 htmlParserCtxtPtr ctxt;
2214 ctxt = htmlCreatePushParserCtxt(
NULL,
NULL,
2216 htmlCtxtUseOptions(ctxt,
options);
2217 while ((
res =
fread(chars, 1, pushsize,
f)) > 0) {
2218 htmlParseChunk(ctxt, chars,
res, 0);
2220 htmlParseChunk(ctxt, chars, 0, 1);
2222 htmlFreeParserCtxt(ctxt);
2229 else if ((html) && (
memory)) {
2248 munmap((
char *)
base,
info.st_size);
2257 #ifdef LIBXML_PUSH_ENABLED 2268 #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) 2270 #elif defined(__OS400__) 2285 ctxt = xmlCreatePushParserCtxt(
NULL,
NULL,
2289 xmlParseChunk(ctxt, chars,
res, 0);
2291 xmlParseChunk(ctxt, chars, 0, 1);
2311 #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) 2313 #elif defined(__OS400__) 2338 ctxt->
sax->error = xmlHTMLError;
2339 ctxt->
sax->warning = xmlHTMLWarning;
2372 munmap((
char *)
base,
info.st_size);
2375 #ifdef LIBXML_VALID_ENABLED 2388 if (ctxt->
valid == 0)
2398 #ifdef LIBXML_SAX1_ENABLED 2417 endTimer(
"Parsing");
2434 #ifdef LIBXML_XINCLUDE_ENABLED 2439 if (xmlXIncludeProcessFlags(doc,
options) < 0)
2442 endTimer(
"Xinclude processing");
2447 #ifdef LIBXML_XPATH_ENABLED 2448 if (xpathquery !=
NULL) {
2449 doXPathQuery(doc, xpathquery);
2453 #ifdef LIBXML_DEBUG_ENABLED 2454 #ifdef LIBXML_XPATH_ENABLED 2459 xmlXPathOrderDocElems(doc);
2465 #ifdef LIBXML_TREE_ENABLED 2474 doc = xmlCopyDoc(doc, 1);
2476 endTimer(
"Copying");
2483 endTimer(
"Freeing original");
2488 #ifdef LIBXML_VALID_ENABLED 2489 if ((
insert) && (!html)) {
2498 nb = xmlValidGetValidElements(
node->last,
NULL,
list, 256);
2501 }
else if (nb == 0) {
2504 fprintf(
stderr,
"%d element types can be inserted under root:\n",
2506 for (
i = 0;
i < nb;
i++) {
2514 #ifdef LIBXML_READER_ENABLED 2519 #ifdef LIBXML_OUTPUT_ENABLED 2526 #ifdef LIBXML_DEBUG_ENABLED 2532 #ifdef LIBXML_HTML_ENABLED 2533 if ((html) && (!xmlout)) {
2556 if (htmlDocDump(
out, doc) < 0)
2571 #ifdef LIBXML_C14N_ENABLED 2586 }
else if (canonical_11) {
2601 if (exc_canonical) {
2630 xmlDocDumpFormatMemory(doc, &
result, &
len, 1);
2648 }
else if (oldout) {
2663 }
else if (
format == 1) {
2678 if (xmlDocDump(
out, doc) < 0)
2689 xmlSaveCtxtPtr ctxt;
2693 saveOpts |= XML_SAVE_FORMAT;
2695 saveOpts |= XML_SAVE_WSNONSIG;
2697 #if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED) 2699 saveOpts |= XML_SAVE_AS_XML;
2703 ctxt = xmlSaveToFd(1,
encoding, saveOpts);
2708 if (xmlSaveDoc(ctxt, doc) < 0) {
2721 #ifdef LIBXML_DEBUG_ENABLED 2730 xmlDebugDumpDocument(
out, doc);
2743 #ifdef LIBXML_VALID_ENABLED 2747 if ((dtdvalid !=
NULL) || (dtdvalidfpi !=
NULL)) {
2753 if (dtdvalid !=
NULL)
2754 dtd = xmlParseDTD(
NULL, (
const xmlChar *)dtdvalid);
2756 dtd = xmlParseDTD((
const xmlChar *)dtdvalidfpi,
NULL);
2758 endTimer(
"Parsing DTD");
2761 if (dtdvalid !=
NULL)
2763 "Could not parse DTD %s\n", dtdvalid);
2766 "Could not parse DTD %s\n", dtdvalidfpi);
2771 if ((cvp = xmlNewValidCtxt()) ==
NULL) {
2773 "Couldn't allocate validation context\n");
2783 if (!xmlValidateDtd(cvp, doc, dtd)) {
2784 if (dtdvalid !=
NULL)
2786 "Document %s does not validate against %s\n",
2790 "Document %s does not validate against %s\n",
2795 endTimer(
"Validating against DTD");
2797 xmlFreeValidCtxt(cvp);
2800 }
else if (postvalid) {
2803 if ((cvp = xmlNewValidCtxt()) ==
NULL) {
2805 "Couldn't allocate validation context\n");
2815 if (!xmlValidateDocument(cvp, doc)) {
2817 "Document %s does not validate\n",
filename);
2821 endTimer(
"Validating");
2823 xmlFreeValidCtxt(cvp);
2826 #ifdef LIBXML_SCHEMATRON_ENABLED 2827 if (wxschematron !=
NULL) {
2828 xmlSchematronValidCtxtPtr ctxt;
2837 flag = XML_SCHEMATRON_OUT_XML;
2839 flag = XML_SCHEMATRON_OUT_TEXT;
2841 flag |= XML_SCHEMATRON_OUT_QUIET;
2842 ctxt = xmlSchematronNewValidCtxt(wxschematron,
flag);
2847 ret = xmlSchematronValidateDoc(ctxt, doc);
2852 }
else if (
ret > 0) {
2856 fprintf(
stderr,
"%s validation generated an internal error\n",
2860 xmlSchematronFreeValidCtxt(ctxt);
2862 endTimer(
"Validating");
2866 #ifdef LIBXML_SCHEMAS_ENABLED 2867 if (relaxngschemas !=
NULL) {
2868 xmlRelaxNGValidCtxtPtr ctxt;
2875 ctxt = xmlRelaxNGNewValidCtxt(relaxngschemas);
2877 ret = xmlRelaxNGValidateDoc(ctxt, doc);
2882 }
else if (
ret > 0) {
2886 fprintf(
stderr,
"%s validation generated an internal error\n",
2890 xmlRelaxNGFreeValidCtxt(ctxt);
2892 endTimer(
"Validating");
2894 }
else if (wxschemas !=
NULL) {
2895 xmlSchemaValidCtxtPtr ctxt;
2902 ctxt = xmlSchemaNewValidCtxt(wxschemas);
2904 ret = xmlSchemaValidateDoc(ctxt, doc);
2909 }
else if (
ret > 0) {
2913 fprintf(
stderr,
"%s validation generated an internal error\n",
2917 xmlSchemaFreeValidCtxt(ctxt);
2919 endTimer(
"Validating");
2924 #ifdef LIBXML_DEBUG_ENABLED 2925 #if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED) 2926 if ((debugent) && (!html))
2927 xmlDebugDumpEntities(
stderr, doc);
2939 endTimer(
"Freeing");
2989 fprintf(
f,
"Usage : %s [options] XMLfiles ...\n",
name);
2990 #ifdef LIBXML_OUTPUT_ENABLED 2991 fprintf(
f,
"\tParse the XML files and output the result of the parsing\n");
2993 fprintf(
f,
"\tParse the XML files\n");
2995 fprintf(
f,
"\t--version : display the version of the XML library used\n");
2996 #ifdef LIBXML_DEBUG_ENABLED 2997 fprintf(
f,
"\t--debug : dump a debug tree of the in-memory document\n");
2998 fprintf(
f,
"\t--shell : run a navigating shell\n");
2999 fprintf(
f,
"\t--debugent : debug the entities defined in the document\n");
3001 #ifdef LIBXML_READER_ENABLED 3002 fprintf(
f,
"\t--debug : dump the nodes content when using --stream\n");
3005 #ifdef LIBXML_TREE_ENABLED 3006 fprintf(
f,
"\t--copy : used to test the internal copy implementation\n");
3008 fprintf(
f,
"\t--recover : output what was parsable on broken XML documents\n");
3009 fprintf(
f,
"\t--huge : remove any internal arbitrary parser limits\n");
3010 fprintf(
f,
"\t--noent : substitute entity references by their value\n");
3011 fprintf(
f,
"\t--noenc : ignore any encoding specified inside the document\n");
3012 fprintf(
f,
"\t--noout : don't output the result tree\n");
3013 fprintf(
f,
"\t--path 'paths': provide a set of paths for resources\n");
3014 fprintf(
f,
"\t--load-trace : print trace of all external entities loaded\n");
3015 fprintf(
f,
"\t--nonet : refuse to fetch DTDs or entities over network\n");
3016 fprintf(
f,
"\t--nocompact : do not generate compact text nodes\n");
3017 fprintf(
f,
"\t--htmlout : output results as HTML\n");
3018 fprintf(
f,
"\t--nowrap : do not put HTML doc wrapper\n");
3019 #ifdef LIBXML_VALID_ENABLED 3020 fprintf(
f,
"\t--valid : validate the document in addition to std well-formed check\n");
3021 fprintf(
f,
"\t--postvalid : do a posteriori validation, i.e after parsing\n");
3022 fprintf(
f,
"\t--dtdvalid URL : do a posteriori validation against a given DTD\n");
3023 fprintf(
f,
"\t--dtdvalidfpi FPI : same but name the DTD with a Public Identifier\n");
3025 fprintf(
f,
"\t--quiet : be quiet when succeeded\n");
3026 fprintf(
f,
"\t--timing : print some timings\n");
3027 fprintf(
f,
"\t--output file or -o file: save to a given file\n");
3028 fprintf(
f,
"\t--repeat : repeat 100 times, for timing or profiling\n");
3029 fprintf(
f,
"\t--insert : ad-hoc test for valid insertions\n");
3030 #ifdef LIBXML_OUTPUT_ENABLED 3031 #ifdef LIBXML_ZLIB_ENABLED 3032 fprintf(
f,
"\t--compress : turn on gzip compression of output\n");
3035 #ifdef LIBXML_HTML_ENABLED 3036 fprintf(
f,
"\t--html : use the HTML parser\n");
3037 fprintf(
f,
"\t--xmlout : force to use the XML serializer when using --html\n");
3038 fprintf(
f,
"\t--nodefdtd : do not default HTML doctype\n");
3040 #ifdef LIBXML_PUSH_ENABLED 3041 fprintf(
f,
"\t--push : use the push mode of the parser\n");
3042 fprintf(
f,
"\t--pushsmall : use the push mode of the parser using tiny increments\n");
3045 fprintf(
f,
"\t--memory : parse from memory\n");
3047 fprintf(
f,
"\t--maxmem nbbytes : limits memory allocation to nbbytes bytes\n");
3048 fprintf(
f,
"\t--nowarning : do not emit warnings from parser/validator\n");
3049 fprintf(
f,
"\t--noblanks : drop (ignorable?) blanks spaces\n");
3050 fprintf(
f,
"\t--nocdata : replace cdata section with text nodes\n");
3051 #ifdef LIBXML_OUTPUT_ENABLED 3052 fprintf(
f,
"\t--format : reformat/reindent the output\n");
3053 fprintf(
f,
"\t--encode encoding : output in the given encoding\n");
3054 fprintf(
f,
"\t--dropdtd : remove the DOCTYPE of the input docs\n");
3055 fprintf(
f,
"\t--pretty STYLE : pretty-print in a particular style\n");
3056 fprintf(
f,
"\t 0 Do not pretty print\n");
3057 fprintf(
f,
"\t 1 Format the XML content, as --format\n");
3058 fprintf(
f,
"\t 2 Add whitespace inside tags, preserving content\n");
3060 fprintf(
f,
"\t--c14n : save in W3C canonical format v1.0 (with comments)\n");
3061 fprintf(
f,
"\t--c14n11 : save in W3C canonical format v1.1 (with comments)\n");
3062 fprintf(
f,
"\t--exc-c14n : save in W3C exclusive canonical format (with comments)\n");
3063 #ifdef LIBXML_C14N_ENABLED 3065 fprintf(
f,
"\t--nsclean : remove redundant namespace declarations\n");
3066 fprintf(
f,
"\t--testIO : test user I/O support\n");
3067 #ifdef LIBXML_CATALOG_ENABLED 3068 fprintf(
f,
"\t--catalogs : use SGML catalogs from $SGML_CATALOG_FILES\n");
3069 fprintf(
f,
"\t otherwise XML Catalogs starting from \n");
3071 fprintf(
f,
"\t--nocatalogs: deactivate all catalogs\n");
3073 fprintf(
f,
"\t--auto : generate a small doc on the fly\n");
3074 #ifdef LIBXML_XINCLUDE_ENABLED 3075 fprintf(
f,
"\t--xinclude : do XInclude processing\n");
3076 fprintf(
f,
"\t--noxincludenode : same but do not generate XInclude nodes\n");
3077 fprintf(
f,
"\t--nofixup-base-uris : do not fixup xml:base uris\n");
3079 fprintf(
f,
"\t--loaddtd : fetch external DTD\n");
3080 fprintf(
f,
"\t--dtdattr : loaddtd + populate the tree with inherited attributes \n");
3081 #ifdef LIBXML_READER_ENABLED 3082 fprintf(
f,
"\t--stream : use the streaming interface to process very large files\n");
3083 fprintf(
f,
"\t--walker : create a reader and walk though the resulting doc\n");
3084 #ifdef LIBXML_PATTERN_ENABLED 3085 fprintf(
f,
"\t--pattern pattern_value : test the pattern support\n");
3088 fprintf(
f,
"\t--chkregister : verify the node registration code\n");
3089 #ifdef LIBXML_SCHEMAS_ENABLED 3090 fprintf(
f,
"\t--relaxng schema : do RelaxNG validation against the schema\n");
3091 fprintf(
f,
"\t--schema schema : do validation against the WXS schema\n");
3093 #ifdef LIBXML_SCHEMATRON_ENABLED 3094 fprintf(
f,
"\t--schematron schema : do validation against a schematron\n");
3096 #ifdef LIBXML_SAX1_ENABLED 3097 fprintf(
f,
"\t--sax1: use the old SAX1 interfaces for processing\n");
3099 fprintf(
f,
"\t--sax: do not build a tree but work just at the SAX level\n");
3100 fprintf(
f,
"\t--oldxml10: use XML-1.0 parsing rules before the 5th edition\n");
3101 #ifdef LIBXML_XPATH_ENABLED 3102 fprintf(
f,
"\t--xpath expr: evaluate the XPath expression, imply --noout\n");
3105 fprintf(
f,
"\nLibxml project home page: http://xmlsoft.org/\n");
3106 fprintf(
f,
"To report bugs or get some help check: http://xmlsoft.org/bugs.html\n");
3113 fprintf(
stderr,
"Out of memory in xmllint:registerNode()\n");
3116 *(
long*)
node->_private = (
long) 0x81726354;
3123 assert(*(
long*)
node->_private == (
long) 0x81726354);
3144 if (
argv[
i][0] !=
'-')
3149 #ifdef LIBXML_DEBUG_ENABLED 3156 #ifdef LIBXML_TREE_ENABLED 3192 #ifdef LIBXML_OUTPUT_ENABLED 3206 #ifdef LIBXML_HTML_ENABLED 3217 options |= HTML_PARSE_NODEFDTD;
3230 #ifdef LIBXML_VALID_ENABLED 3249 dtdvalidfpi =
argv[
i];
3276 #ifdef LIBXML_PUSH_ENABLED 3294 #ifdef LIBXML_XINCLUDE_ENABLED 3306 else if ((!
strcmp(
argv[
i],
"-nofixup-base-uris")) ||
3313 #ifdef LIBXML_OUTPUT_ENABLED 3314 #ifdef LIBXML_ZLIB_ENABLED 3334 #ifdef LIBXML_DEBUG_ENABLED 3341 #ifdef LIBXML_C14N_ENABLED 3358 #ifdef LIBXML_CATALOG_ENABLED 3395 #ifdef LIBXML_OUTPUT_ENABLED 3403 #ifdef LIBXML_OUTPUT_ENABLED 3413 #ifdef LIBXML_READER_ENABLED 3422 #ifdef LIBXML_PATTERN_ENABLED 3430 #ifdef LIBXML_SAX1_ENABLED 3444 #ifdef LIBXML_SCHEMAS_ENABLED 3457 #ifdef LIBXML_SCHEMATRON_ENABLED 3461 schematron =
argv[
i];
3478 #ifdef LIBXML_XPATH_ENABLED 3483 xpathquery =
argv[
i];
3496 #ifdef LIBXML_CATALOG_ENABLED 3497 if (nocatalogs == 0) {
3501 catal =
getenv(
"SGML_CATALOG_FILES");
3502 if (catal !=
NULL) {
3503 xmlLoadCatalogs(catal);
3511 #ifdef LIBXML_SAX1_ENABLED 3513 xmlSAXDefaultVersion(1);
3515 xmlSAXDefaultVersion(2);
3538 #ifdef LIBXML_VALID_ENABLED 3543 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\n");
3545 "\t\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n");
3547 "<html><head><title>%s output</title></head>\n",
3550 "<body bgcolor=\"#ffffff\"><h1 align=\"center\">%s output</h1>\n",
3554 #ifdef LIBXML_SCHEMATRON_ENABLED 3555 if ((schematron !=
NULL) && (
sax == 0)
3560 xmlSchematronParserCtxtPtr ctxt;
3568 ctxt = xmlSchematronNewParserCtxt(schematron);
3573 wxschematron = xmlSchematronParse(ctxt);
3574 if (wxschematron ==
NULL) {
3576 "Schematron schema %s failed to compile\n", schematron);
3580 xmlSchematronFreeParserCtxt(ctxt);
3582 endTimer(
"Compiling the schemas");
3586 #ifdef LIBXML_SCHEMAS_ENABLED 3587 if ((relaxng !=
NULL) && (
sax == 0)
3592 xmlRelaxNGParserCtxtPtr ctxt;
3600 ctxt = xmlRelaxNGNewParserCtxt(relaxng);
3603 relaxngschemas = xmlRelaxNGParse(ctxt);
3604 if (relaxngschemas ==
NULL) {
3606 "Relax-NG schema %s failed to compile\n", relaxng);
3610 xmlRelaxNGFreeParserCtxt(ctxt);
3612 endTimer(
"Compiling the schemas");
3619 xmlSchemaParserCtxtPtr ctxt;
3624 ctxt = xmlSchemaNewParserCtxt(
schema);
3626 wxschemas = xmlSchemaParse(ctxt);
3627 if (wxschemas ==
NULL) {
3629 "WXS schema %s failed to compile\n",
schema);
3633 xmlSchemaFreeParserCtxt(ctxt);
3635 endTimer(
"Compiling the schemas");
3639 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED) 3642 if (patternc ==
NULL) {
3644 "Pattern %s failed to compile\n",
pattern);
3661 #ifdef LIBXML_VALID_ENABLED 3703 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED) 3710 #ifdef LIBXML_XPATH_ENABLED 3724 for (acount = 0;acount <
repeat;acount++) {
3725 #ifdef LIBXML_READER_ENABLED 3727 streamFile(
argv[
i]);
3737 #ifdef LIBXML_READER_ENABLED 3746 #ifdef LIBXML_READER_ENABLED 3748 streamFile(
argv[
i]);
3764 endTimer(
"%d iterations",
repeat);
3776 #ifdef LIBXML_SCHEMATRON_ENABLED 3777 if (wxschematron !=
NULL)
3778 xmlSchematronFree(wxschematron);
3780 #ifdef LIBXML_SCHEMAS_ENABLED 3781 if (relaxngschemas !=
NULL)
3782 xmlRelaxNGFree(relaxngschemas);
3783 if (wxschemas !=
NULL)
3784 xmlSchemaFree(wxschemas);
3785 xmlRelaxNGCleanupTypes();
3787 #if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED) 3788 if (patternc !=
NULL)
3789 xmlFreePattern(patternc);
static int hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
static void startDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
static void endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc)
static xmllintReturnCode progresult
static void deregisterNode(xmlNodePtr node)
static UCHAR ULONG UCHAR ULONG UCHAR * output
#define XML_XML_DEFAULT_CATALOG
XMLPUBFUN void XMLCALL xmlSetExternalEntityLoader(xmlExternalEntityLoader f)
XMLPUBVAR int xmlGetWarningsDefaultValue
static const WCHAR indent[]
xmlParserInputPtr * inputTab
struct _xmlDtd * intSubset
static int myRead(void *f, char *buf, int len)
ACPI_SIZE strlen(const char *String)
GLsizei const GLchar ** path
static void startElementNsDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes)
XMLPUBFUN xmlChar *XMLCALL xmlStrndup(const xmlChar *cur, int len)
XMLPUBFUN xmlDocPtr XMLCALL xmlReadFd(int fd, const char *URL, const char *encoding, int options)
static void xmlHTMLEncodeSend(void)
static void cdataBlockDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len)
XMLPUBFUN void XMLCALL xmlFreeParserInputBuffer(xmlParserInputBufferPtr in)
void(XMLCDECL * warningSAXFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
static void attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *elem, const xmlChar *name, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree)
XMLPUBFUN int XMLCALL inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
xmlValidityErrorFunc error
XMLPUBFUN void XMLCALL xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
static xmlSAXHandler debugSAX2HandlerStruct
XMLPUBFUN int XMLCALL xmlMemUsed(void)
XMLPUBFUN xmlExternalEntityLoader XMLCALL xmlGetExternalEntityLoader(void)
XMLPUBFUN xmlDocPtr XMLCALL xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)
static logline * readline(FILE *inf, adns_state adns, int opts)
XMLPUBFUN xmlChar *XMLCALL xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input)
static void notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId)
static char memory[1024 *256]
XMLPUBVAR int xmlLoadExtDtdDefaultValue
static xmlSAXHandler emptySAXHandlerStruct
XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadIO(xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options)
static xmlEntityPtr getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
static xmlSAXHandlerPtr debugSAX2Handler
XMLPUBFUN void *XMLCALL xmlMemMalloc(size_t size) LIBXML_ATTR_ALLOC_SIZE(1)
static void referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
static void processingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target, const xmlChar *data)
GLenum GLuint GLenum GLsizei const GLchar * buf
static void * myReallocFunc(void *mem, size_t size)
#define gettimeofday(tv, tz)
static int isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED)
static void startTimer(void)
static xmlSAXHandlerPtr emptySAXHandler
XMLPUBFUN xmlDocPtr XMLCALL xmlReadFile(const char *URL, const char *encoding, int options)
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
XMLPUBFUN int XMLCALL xmlAddEncodingAlias(const char *name, const char *alias)
static void startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts)
XMLPUBFUN int XMLCALL xmlLineNumbersDefault(int val)
static void elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type, xmlElementContentPtr content ATTRIBUTE_UNUSED)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define LIBXML_TEST_VERSION
xmlOutputBuffer * xmlOutputBufferPtr
XMLPUBFUN xmlChar *XMLCALL xmlStrcat(xmlChar *cur, const xmlChar *add)
static xmlParserInputPtr resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId)
XMLPUBVAR xmlGenericErrorFunc xmlGenericError
static const WCHAR version[]
XMLPUBFUN void XMLCALL xmlFreeDtd(xmlDtdPtr cur)
static int hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
#define LIBXML_READER_ENABLED
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
static xmlParserInputPtr xmllintExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt)
XMLPUBVAR const char * xmlTreeIndentString
XMLPUBFUN void XMLCALL xmlMemFree(void *ptr)
static void myFreeFunc(void *mem)
static void entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
XMLPUBFUN xmlDocPtr XMLCALL xmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options)
XMLPUBFUN int XMLCALL xmlKeepBlanksDefault(int val)
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
XMLPUBVAR const char * xmlParserVersion
XMLPUBFUN void XMLCALL xmlUnlinkNode(xmlNodePtr cur)
XMLPUBFUN int XMLCALL xmlCtxtUseOptions(xmlParserCtxtPtr ctxt, int options)
static xmlEntityPtr getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
static xmlExternalEntityLoader defaultEntityLoader
XMLPUBFUN void XMLCALL xmlFreeDoc(xmlDocPtr cur)
XMLPUBVAR xmlFreeFunc xmlFree
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
XMLPUBFUN void XMLCALL xmlSetCompressMode(int mode)
XMLPUBVAR int xmlDoValidityCheckingDefaultValue
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
XMLPUBFUN int XMLCALL xmlParseDocument(xmlParserCtxtPtr ctxt)
XMLPUBFUN void XMLCALL xmlMemoryDump(void)
static xmlSAXHandler debugSAXHandlerStruct
static void internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc)
int main(int argc, char **argv)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
XMLPUBFUN void *XMLCALL xmlMemRealloc(void *ptr, size_t size)
#define memcpy(s1, s2, n)
static void * myMallocFunc(size_t size)
static void parsePath(const xmlChar *path)
struct _xmlSAXHandler * sax
GLsizei const GLfloat * value
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
static void XMLCDECL LIBXML_ATTR_FORMAT(1, 2)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
static void testSAX(const char *filename)
static void externalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
XMLPUBFUN char *XMLCALL xmlMemoryStrdup(const char *str)
GLsizei const GLuint * paths
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNoNetExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt)
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb)
XMLPUBFUN void XMLCALL xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content)
_Check_return_opt_ _CRTIMP char *__cdecl fgets(_Out_writes_z_(_MaxCount) char *_Buf, _In_ int _MaxCount, _Inout_ FILE *_File)
static void endDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
static unsigned __int64 next
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define XML_COMPLETE_ATTRS
void shell(int argc, const char *argv[])
XMLPUBVAR int xmlParserDebugEntities
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content)
_Check_return_ _CRTIMP clock_t __cdecl clock(void)
xmlParserCtxt * xmlParserCtxtPtr
XMLPUBFUN xmlDtdPtr XMLCALL xmlGetIntSubset(const xmlDoc *doc)
XMLPUBFUN int XMLCALL xmlHasFeature(xmlFeature feature)
static char * myStrdupFunc(const char *str)
xmlParserInputPtr(* xmlExternalEntityLoader)(const char *URL, const char *ID, xmlParserCtxtPtr context)
#define LIBXML_PATTERN_ENABLED
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt)
XMLPUBFUN int XMLCALL xmlPedanticParserDefault(int val)
void int int ULONGLONG int va_list * ap
static int myClose(void *context)
XMLPUBFUN xmlNodePtr XMLCALL xmlDocGetRootElement(const xmlDoc *doc)
XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename, const char *encoding, int options)
static void endElementNsDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI)
XMLPUBFUN int XMLCALL xmlMemSetup(xmlFreeFunc freeFunc, xmlMallocFunc mallocFunc, xmlReallocFunc reallocFunc, xmlStrdupFunc strdupFunc)
XMLPUBFUN int XMLCALL xmlSubstituteEntitiesDefault(int val)
static void usage(FILE *f, const char *name)
int strcmp(const char *String1, const char *String2)
struct _xmlNode * children
XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlNewParserCtxt(void)
static void commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
GLuint GLuint GLsizei GLenum type
UINT(* handler)(MSIPACKAGE *)
static void charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
XMLPUBFUN void XMLCALL xmlCleanupParser(void)
static void push(calc_node_t *op)
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
static void ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
static void setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
static void showVersion(const char *name)
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
XMLPUBFUN xmlDocPtr XMLCALL xmlNewDoc(const xmlChar *version)
xmlValidityWarningFunc warning
XMLPUBFUN void XMLCALL xmlFreeEnumeration(xmlEnumerationPtr cur)
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
xmlSAXHandlerPtr debugSAXHandler
static void xmlHTMLPrintFileContext(xmlParserInputPtr input)
_In_ uint16_t _Out_ ULONG * atts
static void unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName)
XMLPUBVAR void * xmlGenericErrorContext
XMLPUBFUN xmlDocPtr XMLCALL xmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size, const char *URL, const char *encoding, int options)
static void registerNode(xmlNodePtr node)
static void xmlHTMLPrintFileInfo(xmlParserInputPtr input)
GLuint const GLchar * name