public Element parseError ( final InputStream in ) { try { final Document doc = parseContent ( in ) ; final Element root = doc . getDocumentElement ( ) ; expect ( root , WebdavTags . error ) ; final List < Element > els = getChildren ( root ) ; if ( els . size ( ) != 1 ) { return null ; } return els . get ( 0 ) ; } catch ( final Throwable ignored ) { return null ; } }
Parse a DAV error response