From 67d8891af5ff98870f519a4282918ad2ebd4b3ff Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 24 Jan 2013 14:43:00 -0800 Subject: [PATCH] Slight change to the parser to avoid false posititives The webservice output uses 'name' as the tag for the dive location. This was added to the parser as unqualified tag and without this change test24.xml was suddenly recognized as a dive (the parser was triggering on the program 'name' attribute). Name should only be recognized as a dive location if it is indeed a child of dive. Signed-off-by: Dirk Hohndel --- parse-xml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse-xml.c b/parse-xml.c index a4fb3a051..55b37a9c4 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -1008,7 +1008,7 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf) return; if (MATCH(".location", utf8_string, &dive->location)) return; - if (MATCH(".name", utf8_string, &dive->location)) + if (MATCH("dive.name", utf8_string, &dive->location)) return; if (MATCH(".suit", utf8_string, &dive->suit)) return;