public void startElement ( String namespaceURI , String localName , String qName , Attributes attrs ) throws SAXException { if ( logger . isLoggable ( Level . FINER ) ) logger . exiting ( className , "startElement(String,String,String,org.xml.sax.Attributes)" ) ; Properties props = new Properties ( ) ; int attrLength = attrs . getLength ( ) ; for ( int i = 0 ; i < attrLength ; i ++ ) { props . put ( attrs . getQName ( i ) , attrs . getValue ( i ) ) ; } JSONObject obj = new JSONObject ( localName , props ) ; if ( this . head == null ) { this . head = obj ; this . current = head ; } else { if ( current != null ) { this . previousObjects . push ( current ) ; this . current . addJSONObject ( obj ) ; } this . current = obj ; } if ( logger . isLoggable ( Level . FINER ) ) logger . exiting ( className , "startElement(String,String,String,org.xml.sax.Attributes)" ) ; }
This function parses an IFix top level element and all its children .