00001 // This is brl/bbas/bxml/bxml_find.h 00002 #ifndef bxml_find_h_ 00003 #define bxml_find_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // \brief functions to search XML documents 00010 // \author Matt Leotta (Brown) 00011 // \date November 30, 2006 00012 // 00013 // \verbatim 00014 // Modifications 00015 // Ozge C Ozcanli Nov 4, 2007 - added find_by_name() method 00016 // \endverbatim 00017 // 00018 00019 #include "bxml_document.h" 00020 00021 //: Return true if \a elm has the same name and contains the same attributes as query 00022 bool bxml_matches(const bxml_element& elm, const bxml_element& query); 00023 00024 //: Find the first element that matches 00025 bxml_data_sptr bxml_find(const bxml_data_sptr& head, 00026 const bxml_element& query); 00027 00028 bool bxml_matches_by_name(const bxml_element& elm, const bxml_element& query); 00029 00030 //: Find the first element that matches the query only by name 00031 // (no check on the attribute matching) 00032 bxml_data_sptr bxml_find_by_name(const bxml_data_sptr& head, 00033 const bxml_element& query); 00034 00035 //: Find all elements that match the query only by name 00036 // (no check on the attribute matching) 00037 vcl_vector<bxml_data_sptr> bxml_find_all_with_name(const bxml_data_sptr& head, 00038 const bxml_element& query); 00039 00040 #endif // bxml_find_h_