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.)
 

Trending Posts

Forum statistics

Threads
957,557
Messages
6,973,549
Members
3,163,854
Latest member
alexanderjames