Phaeyz.Xml 0.0.0

dotnet add package Phaeyz.Xml --version 0.0.0
                    
NuGet\Install-Package Phaeyz.Xml -Version 0.0.0
                    
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="Phaeyz.Xml" Version="0.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Phaeyz.Xml" Version="0.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Phaeyz.Xml" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Phaeyz.Xml --version 0.0.0
                    
#r "nuget: Phaeyz.Xml, 0.0.0"
                    
#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.
#:package Phaeyz.Xml@0.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Phaeyz.Xml&version=0.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Phaeyz.Xml&version=0.0.0
                    
Install as a Cake Tool

Phaeyz

Phaeyz is a set of libraries created and polished over time for use with other projects, and made available here for convenience.

All Phaeyz libraries may be found here.

Phaeyz.Xml

API documentation for Phaeyz.Xml library is here.

This library contains a set of XML utilities and XML extension methods which are useful for other projects, such as Phaeyz.Jfif. Here are some highlights.

XmlPrefixedNamespace

XmlPrefixedNamespace namedPrefix = new("prefix1", "ns://foo"); // Prefixed namespace are now instances
XmlPrefixedNamespace defaultPrefix = new(null, "ns://bar"); // Default prefix works too
bool r = xmlAttribute.GetPrefixedNamespace() == namedPrefix; // Instances may be compared
xmlParentElement.AddNamespaceDeclaration(namedPrefix); // They can be added as declarations on elements
XmlAttribute attr = xmlParentElement.AddAttribute(namedPrefix, "attr", "value"); // They can be used when creating attributes
XmlElement el = xmlParentElement.AddChildElement(namedPrefix, "el"); // They can be used when creating elements

XmlDocument.OptimizeNamespaces()

// Efficiently optimizes namespaces by removing redundant and unnecessary declarations.
// Namespaces will not be moved, and prefixes will be preserved and honored.
xmlDocument.OptimizeNamespaces();

XmlDocument.Render()

// Produces the same output as XDocument.ToString().
string xml = xmlDocument.Render();

Licensing

This project is licensed under GNU General Public License v3.0, which means you can use it for personal or educational purposes for free. However, donations are always encouraged to support the ongoing development of adding new features and resolving issues.

If you plan to use this code for commercial purposes or within an organization, we kindly ask for a donation to support the project's development. Any reasonably sized donation amount which reflects the perceived value of using Phaeyz in your product or service is accepted.

Donation Options

There are several ways to support Phaeyz with a donation. Perhaps the best way is to use Patreon so that recurring small donations continue to support the development of Phaeyz.

Your support is greatly appreciated and helps me continue to improve and maintain Phaeyz!

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Phaeyz.Xml:

Package Downloads
Phaeyz.Jfif

Phaeyz.Jfif

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.0 250 2/14/2025