From 07979798026e383768bf2858c6062ee781cf76eb Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 31 Oct 2007 00:17:24 +0200 Subject: [PATCH] Basic preparation for relations (Let XML parser know about the tags) --- src/osm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/osm.c b/src/osm.c index 57356ce..79c349c 100644 --- a/src/osm.c +++ b/src/osm.c @@ -129,6 +129,7 @@ typedef enum { IN_KEY_TAG, IN_BOUND_TAG, IN_RELATION_TAG, + IN_MEMBER_TAG, END, ERROR } tag_state_t; @@ -764,6 +765,8 @@ else if (strcmp(tag,"way")==0) return IN_WAY_TAG; else if (strcmp(tag,"tag")==0) return IN_KEY_TAG; else if (strcmp(tag,"osm")==0) return IN_OSM_TAG; else if (strcmp(tag,"bound")==0) return IN_BOUND_TAG; +else if (strcmp(tag,"relation")==0) return IN_RELATION_TAG; +else if (strcmp(tag,"member")==0) return IN_MEMBER_TAG; else return ERROR; } @@ -1270,12 +1273,20 @@ switch (t) { } break; case IS_RELATION: + break; } break; case IN_BOUND_TAG: /* Ignore for now */ g_printf("Ignoring bound tag\n"); + break; + case IN_RELATION_TAG: + tag_parent=IS_RELATION; + + break; + case IN_MEMBER_TAG: + break; default: tag_parent=IS_NONE; -- 2.39.5