nl_tokens: Parses an RSM from a query XML element
pl_tokens: public static RSM parseRSM ( Element queryElement ) { RSM rsm = new RSM ( ) ; Element setElement = queryElement . element ( "set" ) ; if ( setElement == null ) { return rsm ; } Element after = setElement . element ( "after" ) ; if ( after != null ) { rsm . setAfter ( after . getText ( ) ) ; } Element before = setElement . element ( "before" ) ; if ( before != null ) { String beforeText = before . getText ( ) ; rsm . setBefore ( beforeText == null ? "" : beforeText ) ; } Element index = setElement . element ( "index" ) ; if ( index != null ) { rsm . setIndex ( Integer . parseInt ( index . getText ( ) ) ) ; } Element <mask> = setElement . element ( "max" ) ; if ( max != null ) { rsm . setMax ( Integer . parseInt ( max . getText ( ) ) ) ; } return rsm ; }