Here is a complete code that performs the conversion:
Document doc = new Document(filename);
// save the document in Aspose.Pdf.Xml format into a memory stream.
MemoryStream stream = new MemoryStream();
// seek to the beginning so it can be read by XmlDocument.
// load the document into an XmlDocument
XmlDocument xmlDoc = new XmlDocument();
// load the XML document into Aspose.Pdf
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
// make sure the images that were saved by Aspose.Word into Windows temporary
// folder are automatically deleted by Aspose.Pdf when they are no longer needed.
pdf.IsImagesInXmlDeleteNeeded = true;
// cache true type fonts to increase speed
pdf.IsTruetypeFontMapCached = true;
pdf.TruetypeFontMapPath = Path.GetTempPath();
// now produce the PDF file.
pdf.Save(System.IO.Path.GetFileNameWithoutExtension(filename) + ".pdf");
As you can see the format type to save as document as Xml for Pdf is actually called: