Writes the last item read.
[Visual Basic] Sub WriteItem() [C#] void WriteItem(); [C++] void WriteItem(); [JScript] function WriteItem();
If you call this method, you must call it before the next call to the ReadItem or CloseInput methods.
myFilter.OpenInputFile("myFile.xyz", "en-us", "windows-1252"); myFilter.OpenOutputFile("myFile.out.xyz"); int nRes; do { nRes = myFilter.ReadItem(); switch ( nRes ) { case FiterItemType.ERROR: myLog.Error("An error has occurred."); continue; case FiterItemType.USERCANCEL: myLog.Message("Operation cancelled."); continue; case FiterItemType.ENDINPUT: continue; // Normal end case FilterItemType.TEXT: case FilterItemType.STARTGROUP: case FilterItemType.ENDGROUP: case FilterItemType.BINARY: // Do something with the item ... break; } myFilter.WriteItem(); } while ( nRes > FiterItemType.ENDINPUT ); myFilter.CloseOutput(); myFilter.CloseInput();
IFilter Interface | Okapi.Library.Filter Namespace | OpenOutputFile | OpenOutputString | ReadItem | CloseInput