summaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/xml/dom/wildcard-source.txx
blob: 1c174cf1ea1a2c08c6935291439cd85dfd530280 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// file      : xsd/cxx/xml/dom/wildcard-source.txx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC
// license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

#include <xercesc/util/XMLUniDefs.hpp> // chLatin_L, etc

#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/dom/DOMImplementationRegistry.hpp>

namespace xsd
{
  namespace cxx
  {
    namespace xml
    {
      namespace dom
      {
        template <typename C>
        xml::dom::auto_ptr<xercesc::DOMDocument>
        create_document ()
        {
          const XMLCh ls[] = {xercesc::chLatin_L,
                              xercesc::chLatin_S,
                              xercesc::chNull};

          // Get an implementation of the Load-Store (LS) interface.
          //
          xercesc::DOMImplementation* impl (
            xercesc::DOMImplementationRegistry::getDOMImplementation (ls));

          return xml::dom::auto_ptr<xercesc::DOMDocument> (
            impl->createDocument ());
        }
      }
    }
  }
}