* XML parser conformance to W3 spec

* Names lexically correct (NCName)
  * Syntactically Correct handling of '<?' (processing instructions) and '<?xml' (XML declaration)
  * XML prolog syntax for 'well-formed' XML
  * <!DOCTYPE (ie DTD) is not supported.
This commit is contained in:
Olof hagsand 2018-11-18 13:22:08 +01:00
parent 9bd0dc42c6
commit 9c57902b96
9 changed files with 280 additions and 69 deletions

View file

@ -133,13 +133,14 @@ main(int argc, char **argv)
clicon_log_init("xpath", LOG_DEBUG, CLICON_LOG_STDERR);
optind = 1;
opterr = 0;
while ((c = getopt(argc, argv, "hDf:p:i:")) != -1)
while ((c = getopt(argc, argv, "hD:f:p:i:")) != -1)
switch (c) {
case 'h':
usage(argv0);
break;
case 'D':
debug++;
if (sscanf(optarg, "%d", &debug) != 1)
usage(argv0);
break;
case 'f': /* XML file */
filename = optarg;