XML/HTML batch generator
If your problem is speed and the generated HTML is as easy as it look in your example code, then I would not use the Nokogiri Builder.

Take a HTML-Template and build your files according this template.

Example (without an example XML I was not able to check it):

# search taxonomy.xml for nodes with the attribute 'atlas_node_id'
# to get a NodeSet of all the destinations
destinations = tax_file.css('[atlas_node_id]')

destinations.each do |destination|
# temp variable to make code easier to read later on
id = destination.attribute('atlas_node_id').value

# write file using destination name as filename
filename = destination.children[1].content + ".html"
File.open(File.join(directory,filename),'w'){|html|
  html &lt;&lt; &lt;&lt;HTML % destination.children[1].content
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"&gt;
&lt;html&gt;      
&lt;head&gt;
&lt;title&gt;%s&lt;/title&gt;
&lt;link rel='stylesheet' href="all.css"&gt;
&lt;/head&gt;
&lt;body&gt;
HTML
  html &lt;&lt; "&lt;h1&gt;%s&lt;/h1&gt;\n" % destination.children[1].content

      # check if there is a destination higher in the taxonomy and display
      # the relevant link if so.
      if !(destination.parent.attribute('atlas_node_id').nil?)
        file = destination.parent.children[1].content + ".html"
        html &lt;&lt; '&lt;a href = "%s"&gt;%s&lt;/a&gt;' % [file,destination.parent.children[1].content]
        html &lt;&lt; "\n"
      end

      # I chose to show the overview content since this exists for every
      # destination
      node = dest_file.xpath("//destination[@atlas_id = #{id}]").first
      html &lt;&lt; "&lt;p&gt;%s&lt;/p&gt;\n" % node.xpath(".//introductory/introduction/overview").text unless node.nil?
      html &lt;&lt; "&lt;/body&gt;"
  }

end