public static StreamError parseStreamError ( Element el ) throws IOException , XmlPullParserException { String code = null ; Element condEl = ( Element ) el . elements ( ) . iterator ( ) . next ( ) ; if ( condEl . getNamespace ( ) . getURI ( ) . equals ( StreamError . NAMESPACE ) ) { code = condEl . getName ( ) ; } String text = condEl . elementText ( "text" ) ; return new StreamError ( code , text ) ; }
Parses stream error packets .