I just published a new version of my open source C# XmlSlurper library in Github and Nuget.org.
The new version, 1.3.0, contains two major bug fixes:
- In previous versions, when the xml contained CDATA nodes, an error was thrown (“Type System.Xml.XmlCDataSection is not supported”). This has been fixed, so now the following works:
<CustomAttributes>
<Title><![CDATA[DOCUMENTO N. 1234-9876]]></Title>
</CustomAttributes>
This xml can be used as follows:
var cdata = XmlSlurper.ParseText(getFile("CData.xml"));
Console.WriteLine(cdata.Title);
// produces 'DOCUMENTO N. 1234-9876'
- In previous versions, when the xml contained xml comments, an error was thrown (“Type System.Xml.XmlComment is not supported”). This has been fixed; the xml comments are now ignored.
Separately, there are a few more changes that don’t impact the users of the library:
- A Github action was added that, when the package version changes, automatically builds and tests the project, creates a Nuget package and publishes it to Nuget.org. That will save me quite some time come next version 🙂
- The test project was migrated from DotNet Core 2.2 to 3.1.
- The tests were migrated from MSTest to xUnit, to make the project able to be developed both in Windows and in Linux -my personal laptop runs Ubuntu.
The new version is backwards compatible with all previous versions. So if you use it, updating your projects is effortless and strongly recommended.