Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
IProvider.cpp
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#include "Stroika/Foundation/StroikaPreComp.h"
5
6#include "IProvider.h"
7
8#if qStroika_HasComponent_xerces
9#include "Xerces.h"
10#endif
11#if qStroika_HasComponent_libxml2
12#include "LibXML2.h"
13#endif
14
15using namespace Stroika::Foundation;
17using namespace Stroika::Foundation::DataExchange::XML;
18
19#if qStroika_Foundation_DataExchange_XML_SupportParsing and qStroika_Foundation_DataExchange_XML_SupportSchema and qStroika_Foundation_DataExchange_XML_SupportDOM
20const XML::Providers::IXMLProvider* XML::Providers::Private_::GetDefaultProvider_ ()
21{
22 // libxml2 has better XPath support than Xerces (and so therefore also better schema validation).
23 // so make it the default as of 2024-01-14
24#if qStroika_HasComponent_libxml2
25 return &LibXML2::kDefaultProvider;
26#elif qStroika_HasComponent_xerces
27 return &Xerces::kDefaultProvider;
28#endif
29}
30#endif