public void PublishLipidProfile() { var source = new FileArtifactSource(true); var profile = (Profile)source.ReadResourceArtifact(new Uri("http://from.file/TestData/lipid.profile.xml")); var publisher = new ProfileTableGenerator(@"c:\temp\publisher", "test page", false); var result = File.ReadAllText(@"TestData\publish-header.xml"); result += publisher.generate(profile, false).ToString(System.Xml.Linq.SaveOptions.DisableFormatting); result += File.ReadAllText(@"TestData\publish-footer.xml"); File.WriteAllText(@"c:\temp\publisher\publisher.html",result); }
public void PublishLipidProfileStructures() { var source = new FileArtifactSource(true); var profile = (Profile)source.ReadResourceArtifact(new Uri("http://from.file/TestData/lipid.profile.xml")); var publisher = new StructureGenerator(); foreach (var structure in profile.Structure) { var result = File.ReadAllText(@"TestData\publish-header.xml"); result += publisher.generateStructureTable("bla.html", structure, false, @"c:\temp\publisher", false, profile, "http://nu.nl/publisher.html", "publisher.html") .ToString(System.Xml.Linq.SaveOptions.DisableFormatting); result += File.ReadAllText(@"TestData\publish-footer.xml"); File.WriteAllText(@"c:\temp\publisher\" + structure.Name + ".html", result); } }