XMLPort for importing text files

How do i do that ? And how can i check for existing item no and modify it if its exist ?