public Object parse(InputStream xmlin) throws Exception {
  DocumentBuilder db=null;
  try {
    db=XMLUtils.getSafeDocumentBuilder(false);
  }
 catch (  ParserConfigurationException e) {
    throw new Exception("DBG:Got ParserConfigurationException:" + e.toString());
  }
  Document doc=null;
  try {
    doc=db.parse(xmlin);
  }
 catch (  SAXParseException e) {
    throw new Exception("DBG:Got SAXParseException:" + e.toString() + "line:"+ e.getLineNumber()+ " col :"+ e.getColumnNumber());
  }
catch (  SAXException e) {
    throw new Exception("DBG:Got SAXException:" + e.toString());
  }
catch (  IOException ex) {
    throw new Exception("DBG: Got IOException:" + ex.toString());
  }
  Element elem=doc.getDocumentElement();
  return (walkTree(elem));
}

public Object parse ( InputStream xmlin ) throws Exception { DocumentBuilder db = null ; try { db = XMLUtils . getSafeDocumentBuilder ( false ) ; } catch ( ParserConfigurationException e ) { throw new Exception ( "DBG:Got ParserConfigurationException:" + e . toString ( ) ) ; } Document doc = null ; try { doc = db . parse ( xmlin ) ; } catch ( SAXParseException e ) { throw new Exception ( "DBG:Got SAXParseException:" + e . toString ( ) + "line:" + e . getLineNumber ( ) + " col :" + e . getColumnNumber ( ) ) ; } catch ( SAXException e ) { throw new Exception ( "DBG:Got SAXException:" + e . toString ( ) ) ; } catch ( IOException ex ) { throw new Exception ( "DBG: Got IOException:" + ex . toString ( ) ) ; } Element elem = doc . getDocumentElement ( ) ; return ( walkTree ( elem ) ) ; }
parses an xml document .
