00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef VCSN_XML_TOOLS_HH
00019 # define VCSN_XML_TOOLS_HH
00020 
00031 # include <string>
00032 
00033 # include <xercesc/sax2/Attributes.hpp>
00034 # include <xercesc/util/XMLString.hpp>
00035 # include <xercesc/dom/DOM.hpp>
00036 
00037 namespace vcsn
00038 {
00039   namespace xml
00040   {
00041     namespace tools
00042     {
00046       bool
00047       has_attribute (const xercesc::Attributes& attrs,
00048                      const char* key,
00049                      const XMLCh* const uri = 0);
00050 
00051       const XMLCh*
00052       get_attribute (const xercesc::Attributes& attrs,
00053                      const char* key,
00054                      const XMLCh* uri = 0);
00055 
00059       void
00060       set_attribute (xercesc::DOMElement* e,
00061                      const std::string& k, const std::string& v);
00065       xercesc::DOMElement*
00066       create_element(xercesc::DOMDocument* doc,
00067                      const std::string& e);
00068     } 
00069   } 
00070 } 
00071 
00072 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00073 #  include <vaucanson/xml/tools.hxx>
00074 # endif // VCSN_USE_INTERFACE_ONLY || !VCSN_USE_LIB
00075 
00076 #endif // !VCSN_XML_TOOLS_HH