00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef VCSN_XML_XERCES_PARSER_HH
00019 # define VCSN_XML_XERCES_PARSER_HH
00020 
00032 # include <iostream>
00033 # include <cstdlib>
00034 
00035 # include <xercesc/dom/DOM.hpp>
00036 # include <xercesc/framework/Wrapper4InputSource.hpp>
00037 
00038 # include <vaucanson/misc/usual_macros.hh>
00039 # include <vaucanson/xml/ios.hh>
00040 # include <vaucanson/xml/strings.hh>
00041 # include <vaucanson/xml/error_handler.hh>
00042 
00043 namespace vcsn
00044 {
00045   namespace xml
00046   {
00047 
00048     struct xerces_parser
00049     {
00058       template <class IStream>
00059       static
00060       xercesc::DOMElement* stream_parser(IStream& is);
00061 
00062     private:
00063       template <class IStream>
00064       static
00065       xercesc::DOMDocument* loaddocument(xercesc::DOMBuilder* parser,
00066                                          IStream& is);
00067     };
00068   } 
00069 
00070 } 
00071 
00072 
00073 # ifndef VCSN_USE_INTERFACE_ONLY
00074 #  include <vaucanson/xml/xerces_parser.hxx>
00075 # endif // VCSN_USE_INTERFACE_ONLY
00076 
00077 
00078 #endif // ! VCSN_XML_XERCES_PARSER_HH