BrainSharp.Xml 1.0.2

Additional Details

This version is deprecated. Please update to latest version

There is a newer version of this package available.
See the version list below for details.
dotnet add package BrainSharp.Xml --version 1.0.2                
NuGet\Install-Package BrainSharp.Xml -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BrainSharp.Xml" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BrainSharp.Xml --version 1.0.2                
#r "nuget: BrainSharp.Xml, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BrainSharp.Xml as a Cake Addin
#addin nuget:?package=BrainSharp.Xml&version=1.0.2

// Install BrainSharp.Xml as a Cake Tool
#tool nuget:?package=BrainSharp.Xml&version=1.0.2                

NuGet

.NET Core library to handle XML files

Handle and compare xml file easily. Please see the examples:

Installation Instructions

Nuget package available (https://www.nuget.org/packages/BrainSharp.Xml/)

Install-Package BrainSharp.Xml

dotnet cli:

dotnet add package BrainSharp.Xml

Parse Xml from String content

using BrainSharp.Xml;

var xml1 = @"<root><child1>text1</child1><child2 attr1='value1'>text2</child2></root>";
var xDocument = Xml.Parse(xml1);

Parse Xml from file asynchronously

using BrainSharp.Xml;

var filePath = $"{Directory.GetCurrentDirectory()}\\Files\\products1.xml";
var xDocument = await Xml.ParseFromFileAsync(filePath);

Find the differences from the XML files

using BrainSharp.Xml;

string xml1 = @"<root><child1>text1</child1><child2 attr1='value1'>text2</child2></root>";
string xml2 = @"<root><child1>text1</child1><child2 attr1='value1'>text2</child2></root>";

listOfDifferences = Xml.ExplainDifference(xml1, xml2);
foreach (var difference in listOfDifferences)
{
    Console.WriteLine(difference); // This will not print nothing, since there are no differences
}  

Find the differences from XML files, asynchronously using the Filepath

using BrainSharp.Xml;

var filePath1 = $"{Directory.GetCurrentDirectory()}\\Files\\products1.xml";
var filePath2 = $"{Directory.GetCurrentDirectory()}\\Files\\products2.xml";
var listOfDifferences = await Xml.ExplainDifferenceFromFilesAsync(filePath1, filePath2);
foreach (var difference in listOfDifferences)
{
    Console.WriteLine(difference);
}

Optional parameters

  1. Avoid... [Add context]

Roadmap

  • Nothing at the moment

More about this library

[Add context]

MIT License

Copyright (c) 2024 Vasilis Plavos

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.7 123 7/6/2024
1.0.6 110 6/23/2024
1.0.5 127 6/23/2024 1.0.5 is deprecated.
1.0.2 138 6/23/2024 1.0.2 is deprecated.

Support XmlDiff and XmlPatch