LiquidTechnologies.XmlObjects.Runtime
20.7.17
dotnet add package LiquidTechnologies.XmlObjects.Runtime --version 20.7.17
NuGet\Install-Package LiquidTechnologies.XmlObjects.Runtime -Version 20.7.17
<PackageReference Include="LiquidTechnologies.XmlObjects.Runtime" Version="20.7.17" />
paket add LiquidTechnologies.XmlObjects.Runtime --version 20.7.17
#r "nuget: LiquidTechnologies.XmlObjects.Runtime, 20.7.17"
// Install LiquidTechnologies.XmlObjects.Runtime as a Cake Addin #addin nuget:?package=LiquidTechnologies.XmlObjects.Runtime&version=20.7.17 // Install LiquidTechnologies.XmlObjects.Runtime as a Cake Tool #tool nuget:?package=LiquidTechnologies.XmlObjects.Runtime&version=20.7.17
XML Data Binding Introduction
What is XML Data Binding
XML Data Binding is the process of creating an XML Data Model from an XML Schema (XSD). This XML Data Model contain strongly typed classes and properties mirroring those defined in the XML Schema. Using the XML Data Model to read and write XML documents is a quicker, easier and less error prone way of working with XML data.
Liquid XML Objects provides highly accurate conversion between XML and the generated class model. Allowing complex XML standards to be supported and includes support for XSD 1.0 and XSD 1.1.
Generating code from an XSD
The first step is to generate an XML Data Model from your XML Schema (XSD).
This can be done Visual Studio or via the command line.
In Visual Studio simply include the XSD within your and right click the "Generate Data Binding Code" menu item, that's it you're done!
Using the generated code
Once you have generated an XML Data Model, using it couldn't be simpler. We will read an XML document. This is achieved by using the LxSerializer< T> factory class, which will create an instance of our object.
De-serializing and XML document
LxSerializer<BookstoreElm> serializer = new LxSerializer<BookstoreElm>();
BookstoreElm bookstore = serializer.Deserialize(@"..\..\BookstoreSample.xml");
Then simply use the strongly typed properties to read data from the object.
Reading data from the generated classes
// Display details about the books
foreach (var book in bookstore.Book)
Console.WriteLine($"Book : {book.Title} by {book.Author.First_Name} {book.Author.Last_Name} published on {book.Publicationdate}");
Data within the class library can be modified in the same way.
Writing data into the generated classes
// Reduce the price of all reference books
foreach (var book in bookstore.Book.Where(b => b.Genre == BookTypeCt.GenreEnum.Reference))
book.Price = book.Price / 2;
The XML data can then be written back out using the LxSerializer<T> we created earlier.
Serializing the classes as XML data Copy Code
serializer.Serialize(@"..\..\UpdatedBookstoreSample.xml", bookstore);
And that's it in a nutshell. Simple, clean and easy. The generated code makes working with XML data simple and easy, whilst being extremely light weight and fast.
Learn More
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.0
- RedGate.SmartAssembly.Attributes (>= 8.1.1.4963)
-
.NETFramework 4.5
- RedGate.SmartAssembly.Attributes (>= 8.1.1.4963)
- System.ServiceModel.Primitives (>= 4.6.0)
-
.NETStandard 2.0
- RedGate.SmartAssembly.Attributes (>= 8.1.1.4963)
- System.ServiceModel.Primitives (>= 4.6.0)
NuGet packages (187)
Showing the top 5 NuGet packages that depend on LiquidTechnologies.XmlObjects.Runtime:
Package | Downloads |
---|---|
LiquidTechnologies.XmlObjects.Runtime.Web
XML Serialization Web Extensions library for XSD 1.0 and 1.1 compliance (Runtime Library). Download Liquid XML Objects code generator and Visual Studio extension from the project page. |
|
LiquidTechnologies.XmlObjects.XBRL2-1
An object model for the XBRL 2.1 standard providing strongly typed classes that can be serialized/deserializsed to XML. |
|
LiquidTechnologies.XmlObjects.AcordLife2-20-01
An object model for the Acord Life standard providing strongly typed classes that can be serialized/deserializsed to XML. |
|
LiquidTechnologies.XmlObjects.AcordProperty1-16-0
An object model for the Acord - Property 1.16.0 standard providing strongly typed classes that can be serialized/deserializsed to XML. |
|
LiquidTechnologies.XmlObjects.HRXML3-1
An object model for the HR-XML 3.1 standard providing strongly typed classes that can be serialized/deserializsed to XML. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
20.7.17 | 416 | 10/16/2024 |
20.7.16 | 215 | 10/7/2024 |
20.7.15 | 211 | 9/23/2024 |
20.7.14 | 419 | 9/5/2024 |
20.7.13 | 483 | 8/22/2024 |
20.7.12 | 2,377 | 7/25/2024 |
20.7.11 | 599 | 6/18/2024 |
20.7.10 | 231 | 6/7/2024 |
20.7.9 | 1,951 | 4/26/2024 |
20.7.8 | 1,683 | 4/8/2024 |
20.7.7 | 462 | 3/7/2024 |
20.7.6 | 140 | 2/29/2024 |
20.7.5 | 3,497 | 1/26/2024 |
20.7.4 | 1,630 | 12/9/2023 |
20.7.3 | 322 | 11/21/2023 |
20.7.2 | 214 | 11/10/2023 |
20.7.1 | 194 | 11/5/2023 |
20.7.0 | 167 | 11/3/2023 |
20.6.1 | 5,936 | 10/11/2023 |
20.6.0 | 1,918 | 8/16/2023 |
20.5.0 | 501 | 7/25/2023 |
20.4.4 | 2,195 | 6/6/2023 |
20.4.3 | 1,011 | 5/22/2023 |
20.4.2 | 2,079 | 5/17/2023 |
20.4.1 | 225 | 5/11/2023 |
20.4.0 | 231 | 5/10/2023 |
20.3.1 | 1,345 | 4/25/2023 |
20.3.0 | 1,291 | 4/3/2023 |
20.2.6 | 8,715 | 3/10/2023 |
20.2.5 | 500 | 2/27/2023 |
20.2.4 | 499 | 1/31/2023 |
20.2.3 | 335 | 1/31/2023 |
20.2.2 | 509 | 1/12/2023 |
20.2.1 | 424 | 1/7/2023 |
20.2.0 | 664 | 11/21/2022 |
20.1.5 | 3,532 | 11/7/2022 |
20.1.4 | 851 | 10/27/2022 |
20.1.3 | 1,663 | 10/11/2022 |
20.1.2 | 455 | 10/6/2022 |
20.1.1 | 492 | 9/28/2022 |
20.1.0 | 701 | 9/20/2022 |
20.0.6 | 6,767 | 8/2/2022 |
20.0.5 | 730 | 7/11/2022 |
20.0.4 | 574 | 6/24/2022 |
20.0.3 | 4,764 | 6/17/2022 |
20.0.2 | 671 | 6/8/2022 |
20.0.1 | 8,026 | 5/21/2022 |
19.0.14 | 34,888 | 1/31/2022 |
19.0.13 | 2,072 | 12/13/2021 |
19.0.12 | 949 | 11/11/2021 |
19.0.11 | 1,802 | 9/23/2021 |
19.0.10 | 7,604 | 6/11/2021 |
19.0.9 | 708 | 5/22/2021 |
19.0.8 | 534 | 5/10/2021 |
19.0.7 | 6,838 | 4/27/2021 |
19.0.6 | 866 | 4/6/2021 |
19.0.5 | 504 | 3/29/2021 |
19.0.4 | 461 | 3/26/2021 |
19.0.3 | 1,796 | 3/12/2021 |
19.0.2 | 588 | 3/1/2021 |
19.0.1 | 503 | 2/27/2021 |
18.0.21 | 2,689 | 1/7/2021 |
18.0.20 | 1,349 | 12/9/2020 |
18.0.19 | 1,349 | 12/1/2020 |
18.0.18 | 11,136 | 11/13/2020 |
18.0.17 | 527 | 11/10/2020 |
18.0.16 | 5,362 | 10/26/2020 |
18.0.15 | 19,420 | 10/8/2020 |
18.0.14 | 1,077 | 9/30/2020 |
18.0.13 | 546 | 9/22/2020 |
18.0.12 | 1,622 | 9/1/2020 |
18.0.11 | 4,618 | 8/5/2020 |
18.0.10 | 2,021 | 7/23/2020 |
18.0.9 | 666 | 7/14/2020 |
18.0.8 | 27,104 | 5/24/2020 |
18.0.7 | 608 | 5/15/2020 |
18.0.6 | 6,608 | 5/1/2020 |
18.0.5 | 14,590 | 4/17/2020 |
18.0.4 | 2,250 | 3/14/2020 |
18.0.3 | 657 | 3/9/2020 |
18.0.2 | 1,050 | 2/22/2020 |
18.0.1 | 719 | 2/5/2020 |
17.1.14 | 14,978 | 12/12/2019 |
17.1.13 | 6,334 | 10/25/2019 |
17.1.12 | 1,315 | 10/18/2019 |
17.1.11 | 787 | 10/4/2019 |
17.1.10 | 929 | 9/27/2019 |
17.1.9 | 728 | 9/12/2019 |
17.1.8 | 688 | 9/2/2019 |
17.1.7 | 627 | 8/28/2019 |
17.1.6 | 647 | 8/21/2019 |
17.1.5 | 707 | 8/15/2019 |
17.1.4 | 600 | 8/15/2019 |
17.1.3 | 652 | 8/6/2019 |
17.1.2 | 759 | 7/11/2019 |
17.1.1 | 707 | 7/3/2019 |
17.1.0 | 12,607 | 5/21/2019 |
17.0.6 | 1,986 | 4/15/2019 |
17.0.5 | 734 | 3/27/2019 |
17.0.4 | 682 | 3/27/2019 |
17.0.3 | 849 | 3/12/2019 |
17.0.2 | 701 | 3/12/2019 |
17.0.1 | 716 | 3/3/2019 |
17.0.0 | 850 | 2/6/2019 |
Runtime version must match Liquid XML Objects generator used to generate the Serialization classes.