Skip to content

Commit

Permalink
add optional name pool size argument to DOMParser constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Oct 7, 2016
1 parent 2817376 commit a53464e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion XML/include/Poco/DOM/DOMParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions XML/src/DOMParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a53464e

Please sign in to comment.