function eZXMLInputParser($validateErrorLevel = self::ERROR_NONE, $detectErrorLevel = self::ERROR_NONE, $parseLineBreaks = false, $removeDefaultAttrs = false)
{
// Back-compatibility fixes:
if ($detectErrorLevel === self::SHOW_SCHEMA_ERRORS) {
$detectErrorLevel = self::ERROR_SCHEMA;
} elseif ($detectErrorLevel === self::SHOW_ALL_ERRORS) {
$detectErrorLevel = self::ERROR_ALL;
}
if ($validateErrorLevel === false) {
$validateErrorLevel = self::ERROR_NONE;
} elseif ($validateErrorLevel === true) {
$validateErrorLevel = $detectErrorLevel;
}
$this->ValidateErrorLevel = $validateErrorLevel;
$this->DetectErrorLevel = $detectErrorLevel;
$this->RemoveDefaultAttrs = $removeDefaultAttrs;
$this->ParseLineBreaks = $parseLineBreaks;
$this->XMLSchema = eZXMLSchema::instance();
$this->eZPublishVersion = eZPublishSDK::majorVersion() + eZPublishSDK::minorVersion() * 0.1;
$ini = eZINI::instance('ezxml.ini');
if ($ini->hasVariable('InputSettings', 'TrimSpaces')) {
$trimSpaces = $ini->variable('InputSettings', 'TrimSpaces');
$this->TrimSpaces = $trimSpaces == 'true' ? true : false;
}
if ($ini->hasVariable('InputSettings', 'AllowMultipleSpaces')) {
$allowMultipleSpaces = $ini->variable('InputSettings', 'AllowMultipleSpaces');
$this->AllowMultipleSpaces = $allowMultipleSpaces == 'true' ? true : false;
}
if ($ini->hasVariable('InputSettings', 'AllowNumericEntities')) {
$allowNumericEntities = $ini->variable('InputSettings', 'AllowNumericEntities');
$this->AllowNumericEntities = $allowNumericEntities == 'true' ? true : false;
}
$contentIni = eZINI::instance('content.ini');
$useStrictHeaderRule = $contentIni->variable('header', 'UseStrictHeaderRule');
$this->StrictHeaders = $useStrictHeaderRule == 'true' ? true : false;
}