Acord Life 2.20.01 XML Data Binding  - Nuget packge LiquidTechnologies.XmlObjects.AcordLife2-20-01 Acord Life 2.20.01 XML Data Binding - Nuget packge LiquidTechnologies.XmlObjects.AcordLife2-20-01

Home > XML Data Binding Nuget Packages > Acord Life 2.20.01

 

Acord - Life, Annuity & Health Standards Program

ACORD's Life, Annuity & Health Standards Program supports the life, annuity, and health product lines as well as life reinsurance for individual and group lines of business. Through the Life, Annuity & Health Standards Program, and with membership support and the involvement of industry-sponsored volunteers, ACORD facilitates the development and maintenance of the ACORD Standards for Life, Annuity & Health.

NuGet Package ID LiquidTechnologies.XmlObjects.AcordLife2-20-01
Description An object model for the Acord Life standard providing strongly typed classes that can be serialized/deserializsed to XML.
Documentation Liquid XML Objects API
Schema Documentation https://schemas.liquid-technologies.com/Accord/Life Standards/2.20.01/
Official Schema Site http://www.acord.org/Standards/LifeMain.aspx
License EULA
Supported Platforms
  • .Net Standard 2.0 and above
  • .Net Core 2.0 and above
  • .Net Framework 4.0 and above

The following code shows how to create an XML document using the Accord-Life Standards nuget.

First the object is constructed and populated, then the LxSerializer is used to convert the object representation into XML.

using System;
using System.Numerics;
using System.IO;
using System.Text;
using LiquidTechnologies.XmlObjects;
using LiquidTechnologies.XmlObjects.AcordLife220;
using System.Xml.Linq;
using LiquidTechnologies.XmlObjects;

namespace LiquidTechnologies.Samples
{
    public class XmlGeneratorSample
    {
        public static string CreateXml()
        {
            #region Writing
            var reinsuranceRequestElm = new Tns.ReinsuranceRequestElm();
            reinsuranceRequestElm.Id = "id123";
            reinsuranceRequestElm.ReinsReportPeriodEndDate = new LxDateTime(LxDateTimeType.Date, 2000, 2, 2, 0, 0, 0, 0, 0, 0, true);
            reinsuranceRequestElm.ReinsTranModel.Tc = System.Numerics.BigInteger.Parse("0");
            reinsuranceRequestElm.ReinsTranModel.Value = "";
            reinsuranceRequestElm.ReinsReportPeriodStartDate = new LxDateTime(LxDateTimeType.Date, 2000, 2, 2, 0, 0, 0, 0, 0, 0, true);
            var policyActivityLists = new Tns.PolicyActivityList_TypeCt();
            {
                policyActivityLists.SeqNum = System.Numerics.BigInteger.Parse("0");
                policyActivityLists.PolicyActivity.Tc = System.Numerics.BigInteger.Parse("123");
                policyActivityLists.PolicyActivity.Value = "value1";
                reinsuranceRequestElm.PolicyActivityLists.Add(policyActivityLists);
            }
            var policyActivityLists1 = new Tns.PolicyActivityList_TypeCt();
            {
                policyActivityLists1.SeqNum = System.Numerics.BigInteger.Parse("1");
                policyActivityLists1.PolicyActivity.Tc = System.Numerics.BigInteger.Parse("123");
                policyActivityLists1.PolicyActivity.Value = "value2";
                reinsuranceRequestElm.PolicyActivityLists.Add(policyActivityLists1);
            }


            var serializer = new LxSerializer<Tns.ReinsuranceRequestElm>();
            using (StringWriter writer = new StringWriter())
            {
                serializer.Serialize(writer, reinsuranceRequestElm);
                return writer.ToString();
            }
            #endregion
        }
    }
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Objects - Unlicensed trial - For evaluation only - https://www.liquid-technologies.com/ -->
<ReinsuranceRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="id123" xmlns="http://ACORD.org/Standards/Life/2">
  <ReinsReportPeriodEndDate>2000-02-02Z</ReinsReportPeriodEndDate>
  <ReinsTranModel tc="0"></ReinsTranModel>
  <ReinsReportPeriodStartDate>2000-02-02Z</ReinsReportPeriodStartDate>
  <PolicyActivityList>
    <SeqNum>0</SeqNum>
    <PolicyActivity tc="123">value1</PolicyActivity>
  </PolicyActivityList>
  <PolicyActivityList>
    <SeqNum>1</SeqNum>
    <PolicyActivity tc="123">value2</PolicyActivity>
  </PolicyActivityList>
</ReinsuranceRequest>

Video Tutorial

This video tutorial demonstrates the basic usage of the XML Objects tool. It shows how to generated the code from an XML Schema, how to deserialize an XML document and then Serialize it back out.

Try Liquid Studio and see how we can help you today Free Trial