mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
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
This commit is contained in:
@ -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]);
|
||||
|
Reference in New Issue
Block a user