string xmlMapping = ""; var configuration = new Configuration(); configuration.AddDeserializedMapping(MappingHelper.Parse(xmlMapping), "Person");
using (var stream = File.OpenRead("PersonMapping.xml")) { var configuration = new Configuration(); configuration.AddDeserializedMapping(MappingHelper.Parse(stream), "Person"); }In this example, an XML mapping for a Person class is read from a file stream and passed to the AddDeserializedMapping method along with the class name. Package Library: NHibernate.