Aldsoft.ACORD is a free, open-source library that helps serialize and deserialize the ACORD LA XML standard. The library follows the ACORD XML Schema, so if you have trouble deserializing your ACORD XML string, then it probably wouldn't pass ACORD xsd validation.
The library also provides a helpful Fluent API for constructing the ACORD XML Object programatically.
install-package aldsoft.acord.la.<acord version>
...
// Construct
var builder = TXLife_Type
.CreateBuilder()
.Version("2.35.00")
.AddTXLifeRequest(new TXLifeRequest_Type { id = "3" })
.AddUserAuthRequest(new UserAuthRequest_Type());
var txLife = builder.Build();
// Serialize to string
string xmlString;
txLife.Serialize(out xmlString);
// SaveToFile
txLife.SaveToFile("c:\\path\\to\\file.xml");
...
...
// ACORD XML String received
var xmlString = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<TXLife xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" Version=\"2.35.00\" xmlns=\"http://ACORD.org/Standards/Life/2\">\r\n <UserAuthRequest />\r\n <TXLifeRequest id=\"3\" />\r\n</TXLife>"
// Deserialize
var txLifeObjectFromString = TXLife_Type.Deserialize(xmlString);
Console.WriteLine(txLifeObject.Version);
// output: 2.35.00
// Load From File
var txLifeObjectFromFile = TXLife_Type.LoadFromFile("c:\\path\\to\\file.xml");
...
.\build.ps1
Appveyor is used as the CI build server. Nuget and GitHub Release Drafts are deployed through Appveyor.