code: @Nullable
    public static IMicroDocument readMicroXML (@WillClose @Nullable final InputSource aInputSource,
                                               @Nullable final ISAXReaderSettings aSettings)
    {
      if (aInputSource == null)
        return null;
  
      final EntityResolver aEntityResolver = aSettings == null ? null : aSettings.getEntityResolver ();
      final MicroSAXHandler aMicroHandler = new MicroSAXHandler (false, aEntityResolver, true);
  
      // Copy and modify settings
      final SAXReaderSettings aRealSettings = SAXReaderSettings.createCloneOnDemand (aSettings);
      aRealSettings.setEntityResolver (aMicroHandler)
                   .setDTDHandler (aMicroHandler)
                   .setContentHandler (aMicroHandler)
                   .setLexicalHandler (aMicroHandler);
      if (aRealSettings.getErrorHandler () == null)
      {
        // Use MicroHandler as default error handler if none is specified
        aRealSettings.setErrorHandler (aMicroHandler);
      }
      if (aEntityResolver instanceof EntityResolver2)
      {
        // Ensure to use the new aEntityResolver2 APIs if available
        aRealSettings.setFeatureValue (EXMLParserFeature.USE_ENTITY_RESOLVER2, true);
      }
  
      if (SAXReader.readXMLSAX (aInputSource, aRealSettings).isFailure ())
        return null;
      return aMicroHandler.getDocument ();
    }
docs: Read the passed input source as MicroXML.
  
  @param aInputSource
  The input source to use. May be <code>null</code> in which case
  <code>null</code> is directly returned.
  @param aSettings
  The settings to use. If <code>null</code> the default settings will
  be used.
  @return <code>null</code> if either the input source is <code>null</code>
  or if the input was invalid XML.