Removing LF and extracting two fields

I need some assistance, I am writing a script in bash.

I want to do two things:
1/. I want to replace the LF at the end of the RFH � �MQSTR � so I can process the file record by record using a while loop.

2/. I want to extract two fields from each record, they are identified with tabs <RequestID></RequestID> and <error:Info></error:Info> from the sample data below.

In my file as shown below, each record in the file starts with: RFH � �MQSTR � followed LF followed by the data:

RFH � �MQSTR �
<usr><SourceID>SYSA</SourceID><DSType>SPIResults</DSType><Source>SYSA</Source><Destina
tion>PortalSystem</Destination><RequestID>1000005</RequestID><TargetTablePrimaryKey>5</
TargetTablePrimaryKey><Replay><Original/><Current><DestinationSystemID>SYSA</DestinationSy
stemID></Current></Replay><TargetURI>SYSB</TargetURI><DestinationID>SYSA<
/DestinationID></usr> <mcd><Msd>xmlns</Msd></mcd> <?xml version="1.0"
encoding="UTF-8"?><error:Code>001</error:Code><error:Info>An error occured whilst trying
to process a routing request, see attached exception lists for
details</error:Info><error:OriginalExceptionData></mm:MessageMetadata><mf:MessageFormat SchemaVersion="1.0"><mf:MessageType><msg:Type>SPIResults</msg:Type><msg:Version>1.200</msg:Version>
RFH � �MQSTR �
<usr><SourceID>SYSA</SourceID><DSType>SPIResults</DSType><Source>SYSA</Source><Destina
tion>PortalSystem</Destination><RequestID>1000005</RequestID><TargetTablePrimaryKey>5</
TargetTablePrimaryKey><Replay><Original/><Current><DestinationSystemID>SYSA</DestinationSy
stemID></Current></Replay><TargetURI>SYSB</TargetURI><DestinationID>SYSA<
/DestinationID></usr> <mcd><Msd>xmlns</Msd></mcd> <?xml version="1.0"
encoding="UTF-8"?><error:Info>An error occured whilst trying to process a routing request,
see attached exception lists for details</error:Info><error:OriginalExceptionData>
RFH � �MQSTR �
<usr><SourceID>SYSA</SourceID><DSType>SPIResults</DSType><Source>SYSA</Source><Destina
tion>PortalSystem</Destination><RequestID>1000005</RequestID><TargetTablePrimaryKey>5</
TargetTablePrimaryKey><Replay><Original/><Current><DestinationSystemID>SYSA</DestinationSy
stemID></Current></Replay><TargetURI>SYSB</TargetURI><DestinationID>SYSA<
/DestinationID></usr> <mcd><Msd>xmlns</Msd></mcd> <?xml version="1.0"
encoding="UTF-8"?><error:Info>An error occured whilst trying to process a routing request,
see attached exception lists for details</error:Info></mm:MessageMetadata><mf:MessageFormat SchemaVersion="1.0"><mf:MessageType><msg:Type>SPIResults</msg:Type>

1st: Please use [ c o d e ] [ / c o d e ] tags!!

A bit lengthy, maybe someone comes up a shorter version:

cat infile |\
tr -d '\n' |\
sed 's/[^^]RFH/\nRFH/g' |\
sed 's!.*<RequestID>\([^<]*\)<\/RequestID>.*<error:Info>\([^<]*\)<\/error:Info>.*!\1 \2!g'

Both steps are combined. Not sure if you need to loop for the second step, if so, there is no need to loop, as sed take a stream and checks every single line of input. If you only want step 1 though, just stop after the 1st line of sed ie. redirect it to a new file or whatever.