changes from main repository

This commit is contained in:
Guenter Obiltschnig
2008-01-29 09:06:52 +00:00
parent ab8d8e38e3
commit b526dd81f2
47 changed files with 611 additions and 557 deletions

View File

@@ -1,7 +1,7 @@
//
// ParserEngine.cpp
//
// $Id: //poco/svn/XML/src/ParserEngine.cpp#2 $
// $Id: //poco/svn/XML/src/ParserEngine.cpp#3 $
//
// Library: XML
// Package: XML
@@ -249,6 +249,21 @@ void ParserEngine::parse(InputSource* pInputSource)
}
void ParserEngine::parse(const char* pBuffer, std::size_t size)
{
init();
resetContext();
InputSource src;
pushContext(_parser, &src);
if (_pContentHandler) _pContentHandler->setDocumentLocator(this);
if (_pContentHandler) _pContentHandler->startDocument();
if (!XML_Parse(_parser, pBuffer, static_cast<int>(size), 1))
handleError(XML_GetErrorCode(_parser));
if (_pContentHandler) _pContentHandler->endDocument();
popContext();
}
void ParserEngine::parseByteInputStream(XMLByteInputStream& istr)
{
istr.read(_pBuffer, PARSE_BUFFER_SIZE);