private List < Attribute > getAttributes ( XMLStreamReader reader ) { List < Attribute > list = new ArrayList < Attribute > ( ) ; for ( int i = 0 ; i < reader . getAttributeCount ( ) ; i ++ ) { list . add ( new Attribute ( reader . getAttributeLocalName ( i ) , reader . getAttributeValue ( i ) ) ) ; } return list ; }
Extract XML element attributes form XML input stream