public static void UsingXML()
{
// ExStart:UsingXML
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_AsposePdfGenerator_UtilityFeatures();
// Create a file stream to create the PDF document
FileStream fs = new FileStream( dataDir + "CreatePdfUsingXML_out", FileMode.Create);
// Instantiate the Pdf instance and pass the file stream object to its constructor
Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf(fs);
// Bind the XML file to the Pdf and leave the XSL file parameter as Nothing
pdf.BindXML( dataDir + "log.xml", null);
// Close the Pdf. This method is used only for direct file mode
pdf.Close();
// ExEnd:UsingXML
}