public static String getElementQualifiedName ( XMLStreamReader xmlReader , Map < String , String > namespaces ) { String namespaceUri = null ; String localName = null ; switch ( xmlReader . getEventType ( ) ) { case XMLStreamConstants . START_ELEMENT : case XMLStreamConstants . END_ELEMENT : namespaceUri = xmlReader . getNamespaceURI ( ) ; localName = xmlReader . getLocalName ( ) ; break ; default : localName = StringUtils . EMPTY ; break ; } return namespaces . get ( namespaceUri ) + ":" + localName ; }
Helper method for getting qualified name from stax reader given a set of specified schema namespaces