Video .nfo files containing a mix of XML and URL

I want to add a tag <SimilarFlix> to thousands of my movies. For example for the Movie Saw I have as follows:

Saw (2004).nfo

Code:
<Movie>
<SimilarFlix>Cell, The (2000)</SimilarFlix>
<SimilarFlix>Hannibal (2001)</SimilarFlix>
<SimilarFlix>Saw II (2005)</SimilarFlix>
<SimilarFlix>Seven (1995)</SimilarFlix>  
</Movie>
http://www.themoviedb.org/movie/####

How can I easily get the (thousands) of themoviedb identifiers I need to fill in the #### portion above? They don’t seem to be shown within the separate NFOs I’ve downloaded.