summaryrefslogtreecommitdiff
path: root/testSAX.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-03-18 18:36:20 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-03-18 18:36:20 +0000
commit5997aca8b8d6b6803e195978127f97d94e5931a7 (patch)
treeefe92c238a00a6f9496e2d5ba18188ed6ea43f64 /testSAX.c
parentb5a60eccfd6a14ac4dea3f00714bf716b66e4cc6 (diff)
downloadlibxml2-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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/testSAX.c b/testSAX.c
index 0bf394f3..559177c7 100644
--- a/testSAX.c
+++ b/testSAX.c
@@ -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]);