From e5f2ecde9def2752488d3d8fce23e2996389d55f Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 18 Jan 2006 10:30:58 +0000 Subject: [PATCH] Change RouterFleXML so that filters element gets optional --- src/router_flexml.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/router_flexml.cpp b/src/router_flexml.cpp index 16aec11..027d2ae 100644 --- a/src/router_flexml.cpp +++ b/src/router_flexml.cpp @@ -1,4 +1,4 @@ -/* $Id: router_flexml.cpp,v 1.14 2006-01-11 13:13:49 adam Exp $ +/* $Id: router_flexml.cpp,v 1.15 2006-01-18 10:30:58 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% @@ -233,13 +233,15 @@ void yp2::RouterFleXML::Rep::parse_xml_config_dom(xmlDocPtr doc) } node = yp2::xml::jump_to_next(node, XML_ELEMENT_NODE); } - // process node which is expected second element node - yp2::xml::check_element_yp2(node, "filters"); - - parse_xml_filters(doc, yp2::xml::jump_to_children(node, XML_ELEMENT_NODE)); + // process node if given + if (yp2::xml::is_element_yp2(node, "filters")) + { + parse_xml_filters(doc, yp2::xml::jump_to_children(node, + XML_ELEMENT_NODE)); + node = yp2::xml::jump_to_next(node, XML_ELEMENT_NODE); + } // process node which is expected third element node - node = yp2::xml::jump_to_next(node, XML_ELEMENT_NODE); yp2::xml::check_element_yp2(node, "routes"); parse_xml_routes(doc, yp2::xml::jump_to_children(node, XML_ELEMENT_NODE)); -- 1.7.10.4