diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-03-18 18:36:20 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-03-18 18:36:20 +0000 |
commit | 5997aca8b8d6b6803e195978127f97d94e5931a7 (patch) | |
tree | efe92c238a00a6f9496e2d5ba18188ed6ea43f64 /testSAX.c | |
parent | b5a60eccfd6a14ac4dea3f00714bf716b66e4cc6 (diff) | |
download | libxml2-5997aca8b8d6b6803e195978127f97d94e5931a7.tar.gz |
humm, changed the way the SAX parser work when
* parser.c: humm, changed the way the SAX parser work when
xmlSubstituteEntitiesDefault(1) is set, it will then
do the entity registration and loading by itself in case the
user provided SAX getEntity() returns NULL.
* testSAX.c: added --noent to test the behaviour.
Daniel
Diffstat (limited to 'testSAX.c')
-rw-r--r-- | testSAX.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -44,6 +44,7 @@ static int copy = 0; static int recovery = 0; static int push = 0; static int speed = 0; +static int noent = 0; xmlSAXHandler emptySAXHandlerStruct = { NULL, /* internalSubset */ @@ -718,7 +719,11 @@ int main(int argc, char **argv) { else if ((!strcmp(argv[i], "-speed")) || (!strcmp(argv[i], "--speed"))) speed++; + else if ((!strcmp(argv[i], "-noent")) || + (!strcmp(argv[i], "--noent"))) + noent++; } + if (noent != 0) xmlSubstituteEntitiesDefault(1); for (i = 1; i < argc ; i++) { if (argv[i][0] != '-') { parseAndPrintFile(argv[i]); |