how to get XML content over HTTP request? I'm building a module and I need to  get XML content over HTTP request. 

The idea is to create nodes programmatically with the retrieved data from the xml file.

Can I do this?
Its a little bit of a learning curve , but I would recommend using the feeds module for this

https://www.drupal.org/project/feeds

you can then load xml (or csv) to nodes, and map its contents to nodes. 
This is preferable to writing your own custom functionality. 

but if you do, drupal_http_request(), and then node_save() for constructing the nodes would be the way to do things. 
If you do code it yourself, Id recommend getting comfortable with running scripts with drush, as that'll be easier than battling timeouts in the browser