Deprecated Package Version
Reason: Legacy
Package was renamed
Suggested alternative:Meziantou.Framework.Language.Xml*
Install
dotnet add package Meziantou.Framework.Xml --version 1.0.0
| Product | Versions |
|---|---|
| .NET |
README
Meziantou.Framework.Xml
Meziantou.Framework.Xml provides immutable XML syntax tree APIs focused on roundtrip-safe XML processing:
- parse XML into a syntax tree without reformatting it
- navigate/query nodes with XPath
- edit targeted nodes
- save back while preserving untouched text and formatting
- support for XML namespaces in queries and edits
- support invalid XML documents (for example with unclosed tags) and report diagnostics
using System.Xml;
using Meziantou.Framework.Xml;
const string xml = "<root><item version='1.0.0' /></root>";
var tree = XmlSyntaxTree.ParseText(xml);
// Navigate the tree
tree.Root.DescendantNodes().OfType<XmlAttributeSyntax>().First().Value;
// Navigate the tree with XPath
var itemNode = tree.Root.SelectSingleNode("//item");
// Update a node
var updatedRoot = tree.Root.ReplaceNode(
itemNode,
XmlSyntaxFactory.Element("newItem").WithAttribute("version", "2.0.0"));
// Update the tree with XPath
var updatedRoot = tree.Root.ReplaceNode(
"//item/@version",
node => ((XmlAttributeSyntax)node).WithValue("2.0.0"));
// Get the updated XML
var updatedXml = updatedRoot.ToFullString();
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
NuGet marks this package as deprecated and points to Meziantou.Framework.Language.Xml as an alternative.Compatibility metadata lists 4 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.