Vaucanson 1.4
tools.hh
Go to the documentation of this file.
00001 // tools.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2007, 2008 The Vaucanson Group.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // The complete GNU General Public Licence Notice can be found as the
00013 // `COPYING' file in the root directory.
00014 //
00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
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       bool
00052       has_attribute (const xercesc::Attributes& attrs,
00053                      const XMLCh* xkey,
00054                      const XMLCh* const uri = 0);
00055 
00056       const XMLCh*
00057       get_attribute (const xercesc::Attributes& attrs,
00058                      const char* key,
00059                      const XMLCh* uri = 0);
00060 
00061       const XMLCh*
00062       get_attribute (const xercesc::Attributes& attrs,
00063                      const XMLCh* xkey,
00064                      const XMLCh* uri = 0);
00065 
00069       void
00070       set_attribute (xercesc::DOMElement* e,
00071                      const std::string& k, const std::string& v);
00075       xercesc::DOMElement*
00076       create_element(xercesc::DOMDocument* doc,
00077                      const std::string& e);
00078     } // !tools
00079   } // !xml
00080 } // !vcsn
00081 
00082 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00083 #  include <vaucanson/xml/tools.hxx>
00084 # endif // VCSN_USE_INTERFACE_ONLY || !VCSN_USE_LIB
00085 
00086 #endif // !VCSN_XML_TOOLS_HH