We’ve looked a lot about customizing site definitions on this blog; this time I’d like to show you how you can find an existing site definition. Whether those are custom site definitions or out-of-the-box, you can see what it’s made of and how to create your own site template based of the existing one.
I assume you already have fully configured environment (here we’re using SP2010 Server) and access to the file system on your SP2010 server.
1. Locate the title of the site template you’re interested in exploring. In my case I’ll pick a Record Center site. Site Actions -> New Site -> [take a note of the title].

2. Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\[1033]\XML.
Replace 1033 with appropriate language ID.
In here, you will find number of XML files which have stubs for site templates defined in them. Not each file is per site template. In one of those files you will find the title of the site as displayed in UI in step #1. I recommend using Windows Grep which will allow you to search the contents of files in the entire directory and display exactly which XML file contains the Record Center stub.
3. Once found, you will identify the XML file name, in our case webtempoffile.xml
4. Now navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\SiteTemplates and locate the directory with the same filename without webtemp. In our case offile.
5. Open the XML folder within that directory and that’s where your onet.xml is for the custom or out-of-the-box site definition.
One step further would be to find out which configuration/version of the template you want to use within onet.xml.
To find that, locate the Configuration ID within webtemp file and that’s the same Configuration ID in the onet.xml as you can see for our Record Center site below.

Enjoy!