The code you linked is a mechanism for generating Biml, xml, based on SMO.
Your intention is to reproduce the right click/generate SSIS package, thus converting the Biml XML into a DTSX's XML. To do this, you'll need to look at how BidsHelper does it. In the class BimlExpandPlugin, you'll find version specific calls to the BidsHelper.CompileBiml
ValidationReporter validationReporter = BidsHelper.CompileBiml(
typeof(AstNode).Assembly,
"Varigence.Hadron.BidsHelperPhaseWorkflows.xml",
"Compile", bimlScriptPaths,
new List<string>(),
tempTargetDirectory,
projectDirectory,
SqlServerVersion.SqlServer2008,
SsisVersion.Ssis2012,
SsasVersion.Ssas2008,
DeployPackagesPlugin.IsLegacyDeploymentMode(project) ?
SsisDeploymentModel.Package :
SsisDeploymentModel.Project);
Something to note is that the folks at Varigence provide the functionality that exists for BidsHelper as a subset of what their product, Mist, is capable of. One of those things is skipping the XML mashing and just use native .NET objects to create and describe SSIS objects. If you want to work with the .NET objects, then you'll need to buy a license.