private String parseCellInlineStringText ( XMLEventReader xer ) throws XMLStreamException , FormatNotUnderstoodException { String result = "" ; XMLEvent xe ; while ( ( xe = xer . nextTag ( ) ) . isStartElement ( ) ) { String elementName = xe . asStartElement ( ) . getName ( ) . getLocalPart ( ) . toUpperCase ( ) ; switch ( elementName ) { case "T" : // normal text result = xer . getElementText ( ) ; break ; case "R" : // rich text (returned as normal text) result = this . parseCellInlineStringRichText ( xer ) ; break ; case "RPH" : // phonetic (ignored) case "PHONETICPR" : // phonetic properties (ignored) this . skipXMLElementHierarchy ( xer ) ; break ; default : LOG . error ( "Unknown inline string tag: " + elementName ) ; throw new FormatNotUnderstoodException ( "Unknown inline string tag: " + elementName ) ; } } return result ; }
Parses an inline string from cell in XML format