Convert xml to an internal class, lets call it MyEntry that has id ( the 1 and 2 values in your example, but put them as attribute, the name of the node is irrelevant, put "a" ), beginIndex, endIndex and value (your string) and put a method inside MyEntry in it like:
public function search( string:String ):Boolean
{
return value.indexOf( string ) != -1;
}
//When you search for the string "drawing of Roosevelt":
for each( var entry:MyEntry in entries )
{
if( entry.search( string ) )
{
trace( "Found!" );
break;
}
}