i am making an android OCR app, i want to convert the result in to an xml or doc .

  • Thread starter Thread starter AC Question
  • Start date Start date
A

AC Question

'
'
'
'
private void loadData( final Bundle savedInstanceState ) {
if( savedInstanceState != null ) {
_resultText = savedInstanceState.getString( ProcessResultsActivity.KEY_RESULT );
}

if( _resultText == null ) {
final StringBuilder resultTextBuilder = new StringBuilder();
if( RecognitionContext.shouldDetectPageOrientation()
&& ( RecognitionContext.getRecognitionTarget() == RecognitionTarget.TEXT
|| RecognitionContext.getRecognitionTarget() == RecognitionTarget.BUSINESS_CARD ) ) {
resultTextBuilder
.append( "Detected rotation:\n" )
.append( RecognitionContext.getRotationType().name() )
.append( "\n\n" );
}
resultTextBuilder
.append( "Result:\n" )
.append( RecognitionContext.getRecognitionResult().toString() );
_resultText = resultTextBuilder.toString();
}

_resultView.setText( _resultText );

}

"i want to change this resulttext in to an xml file"
 
XML is trivial - just add headers (and don't forget to close each one).

See XML Introduction (W3Schools isn't good for much, but their explanation is simple.)
 

Latest posts

Trending Posts

Members online

Forum statistics

Threads
963,184
Messages
6,992,811
Members
3,164,988
Latest member
r3dpuk3