{
        parser = makeParser();
        handler = makeDefaultHandler();
        // set features and properties
        if (parserFeatures != null)
        {
          for (Map.Entry<String, Boolean> feature : parserFeatures.entrySet())
          {
            parser.getXMLReader().setFeature(feature.getKey(),  feature.getValue().booleanValue());
          }
        }
        if (parserProperties !=null)
        {
          for (Map.Entry<String, ?> property : parserProperties.entrySet())
          {
            parser.getXMLReader().setProperty(property.getKey(), property.getValue());
          }
        }
      }