diff --git a/XML/include/Poco/DOM/DOMParser.h b/XML/include/Poco/DOM/DOMParser.h index 440b60574..1a60c2438 100644 --- a/XML/include/Poco/DOM/DOMParser.h +++ b/XML/include/Poco/DOM/DOMParser.h @@ -40,9 +40,12 @@ class XML_API DOMParser /// support of a WhitespaceFilter. { public: - DOMParser(NamePool* pNamePool = 0); + explicit DOMParser(NamePool* pNamePool = 0); /// Creates a new DOMParser. /// If a NamePool is given, it becomes the Document's NamePool. + + explicit DOMParser(unsigned long namePoolSize); + /// Creates a new DOMParser, using the given name pool size. ~DOMParser(); /// Destroys the DOMParser. diff --git a/XML/src/DOMParser.cpp b/XML/src/DOMParser.cpp index 4360f0f37..5762760ae 100644 --- a/XML/src/DOMParser.cpp +++ b/XML/src/DOMParser.cpp @@ -39,6 +39,15 @@ DOMParser::DOMParser(NamePool* pNamePool): } +DOMParser::DOMParser(unsigned long namePoolSize): + _pNamePool(new NamePool(namePoolSize)), + _filterWhitespace(false) +{ + _saxParser.setFeature(XMLReader::FEATURE_NAMESPACES, true); + _saxParser.setFeature(XMLReader::FEATURE_NAMESPACE_PREFIXES, true); +} + + DOMParser::~DOMParser() { if (_pNamePool) _pNamePool->release();