public Map parseCatalog(InputSource inputSource){
  XMLReader xmlReader=XMLResource.newXMLReader();
  CatalogContentHandler ch=new CatalogContentHandler();
  addHandlers(xmlReader,ch);
  setFeature(xmlReader,"http://xml.org/sax/features/validation",false);
  try {
    xmlReader.parse(inputSource);
  }
 catch (  Exception ex) {
    throw new RuntimeException("Failed on configuring SAX to DOM transformer.",ex);
  }
  return ch.getEntityMap();
}

public Map parseCatalog ( InputSource inputSource ) { XMLReader xmlReader = XMLResource . newXMLReader ( ) ; CatalogContentHandler ch = new CatalogContentHandler ( ) ; addHandlers ( xmlReader , ch ) ; setFeature ( xmlReader , "http://xml.org/sax/features/validation" , false ) ; try { xmlReader . parse ( inputSource ) ; } catch ( Exception ex ) { throw new RuntimeException ( "Failed on configuring SAX to DOM transformer." , ex ) ; } return ch . getEntityMap ( ) ; }
parses an xml catalog file and returns a map of public ids to local uris read from the catalog . only the catalog public elements are parsed .
