How to create sitemap dynamically for multiple subdomains?

Hello,
I am developing e-commerce site where user can create their own subdomain as per they required.
Sub domains are created dynamically from one running application that means each sub domain will not have own physical directory.
So how can i create following format in sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
   <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <sitemap>
      <loc>http://abc.example.com/sitemap.xml</loc>
   </sitemap>
   <sitemap>
      <loc>http://xyz.example.com/sitemap.xml</loc>
   </sitemap>
   </sitemapindex>

If above format is not possible then please suggest other possible solutions in Meteor.

Thank you