Access control in masterpage from content page

Here is a nice easy one, if you have a control in your .master file that you need to access from your content page you can do the following to manipulate that control.

 
// Create a new object that relates to your .master file control and call the FindControl function to return its properties
Xml xMasterHeaderXML = (Xml)Master.FindControl("xmlHeader");
 
// Do a basic is null check to see if hte control is there or not
if (xMasterHeaderXML != null)
{
     // Set whatever properties and values you need.
     xMasterHeaderXML.DocumentContent = "<root></root>";
     xMasterHeaderXML.TransformSource = "xsl/header.xsl";
}