implement parseRdf helper function