From: Adam Dickmeiss Date: Wed, 18 Jan 2006 10:30:58 +0000 (+0000) Subject: Change RouterFleXML so that filters element gets optional X-Git-Tag: YP2.0.0.2~25 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=e5f2ecde9def2752488d3d8fce23e2996389d55f;p=metaproxy-moved-to-github.git Change RouterFleXML so that filters element gets optional --- 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));