sure here it is:
Code:
RFile file; <---------control comes at this line and goes to s32file.inl as i mentioned in first comment and app crashes with KERN EXEC 3....emulator is fine with this though
TInt error = file.Open(iFsSession, KFileData, EFileRead);
TInt pos = 0;
TInt fileSize;
file.Size(fileSize);
file.Seek(ESeekEnd, pos);
TUint dataLength = pos;
const TInt size = fileSize;
TBuf8<54601>data8;
pos = 0;
file.Seek(ESeekStart, pos);
TInt errRead = file.Read(data8);
file.Close();
data8.TrimAll();
TInt actionTagPos = data8.Find(_L8("action="));
TInt methodTagPos = data8.Find(_L8("method"));
iActionUrl.Copy(data8.Mid(actionTagPos+8, methodTagPos-actionTagPos-10));
TInt optionTagStartPos = data8.Find(_L8("<option>"));
TInt selectTagEndPos = data8.Find(_L8("</select>"));
TInt xmlDataLength = selectTagEndPos-optionTagStartPos;
if(iXmlData)
{
delete iXmlData;
iXmlData = NULL;
}
iXmlData = HBufC8::NewL(xmlDataLength+23);
TInt totalLengthNow = data8.Length();
iXmlData->Des().Copy(_L8("<countries>"));
iXmlData->Des().Append(data8.Mid(optionTagStartPos, xmlDataLength));
iXmlData->Des().Append(_L8("</countries>"));
iXmlData->Des().TrimAll();
RFile xmlFile;
TInt errCreate = xmlFile.Create(iFsSession, KFileXmlData, EFileWrite);
xmlFile.Write(iXmlData->Des());
xmlFile.Close();
TInt errDelete = iFsSession.Delete(KFileData);