How can I set variables only once per block?
You can use static caching in your parse_some_xml function. Some people consider this a cleaner, less evil solution than using global variables (but I will not get into that discussion here).

With static caching, your my_module_block_view() would remain the same, but your parse_some_xml() would look like this:

function parse_some_xml() {
  static $parsed_xml;
  if (!isset($parsed_xml)) {
    // Do the actual parsing here, and store the data in $parsed_xml
  }
  return $parsed_xml;
}


See A Beginners Guide to Caching Data to learn more about static caching.