https://github.com/clarius/mvp.xml
Documentation site for https://github.com/devlooped/Mvp.Xml
https://github.com/clarius/mvp.xml
Last synced: 6 months ago
JSON representation
Documentation site for https://github.com/devlooped/Mvp.Xml
- Host: GitHub
- URL: https://github.com/clarius/mvp.xml
- Owner: clarius
- License: mit
- Created: 2023-03-24T02:11:41.000Z (over 3 years ago)
- Default Branch: gh-pages
- Last Pushed: 2025-02-18T00:07:41.000Z (over 1 year ago)
- Last Synced: 2025-03-01T17:42:43.514Z (over 1 year ago)
- Language: HTML
- Homepage: https://clarius.org/Mvp.Xml
- Size: 35.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.html
- License: license.txt
Awesome Lists containing this project
README

============
[](https://www.nuget.org/packages/Mvp.Xml)
[](https://www.nuget.org/packages/Mvp.Xml)
[](https://github.com//devlooped/Mvp.Xml/blob/main/license.txt)
[](https://github.com/devlooped/Mvp.Xml/actions)
The original Mvp.Xml project, developed by Microsoft MVP's in XML technologies and XML Web Services worldwide.
It is aimed at supplementing .NET XML processing. All the project's classes contain extensive tests to ensure
its quality, as well as the peer review among this highly focused group of XML lovers.
Mvp.Xml project currently provides .NET implementations of [EXSLT](http://www.exslt.org/), [XML Base](http://www.w3.org/TR/xmlbase/),
[XInclude](http://www.w3.org/TR/xinclude/), [XPointer](http://www.w3.org/TR/xptr-framework/) as well as a unique set of utility classes
and tools making XML programming in .NET platform easier, more productive and effective.
## Open Source Maintenance Fee
To ensure the long-term sustainability of this project, users of this package who generate
revenue must pay an [Open Source Maintenance Fee](https://opensourcemaintenancefee.org).
While the source code is freely available under the terms of the [License](license.txt),
this package and other aspects of the project require [adherence to the Maintenance Fee](osmfeula.txt).
To pay the Maintenance Fee, [become a Sponsor](https://github.com/sponsors/devlooped) at the proper
OSMF tier. A single fee covers all of [Devlooped packages](https://www.nuget.org/profiles/Devlooped).
## EXSLT
Example usage of [EXSLT](http://www.exslt.org/):
```csharp
var xslt = new MvpXslTransform();
xslt.Load("foo.xsl");
// Optionally enforce the output to be XHTML
xslt.EnforceXHTMLOutput = true;
xslt.Transform(new XmlInput("foo.xml"), new XmlOutput("result.html"));
```
Usage in XPath-only context:
```csharp
XPathExpression expr = nav.Compile("set:distinct(//author)");
expr.SetContext(new ExsltContext(doc.NameTable));
XPathNodeIterator authors = nav.Select(expr);
while (authors.MoveNext())
Console.WriteLine(authors.Current.Value);
```
## XInclude
Example usage of [XInclude](http://www.w3.org/TR/xinclude/):
```csharp
var reader = new XIncludingReader(XmlReader.Create(uri));
var document = XDocument.Load(reader);
```
## Miscelaneous
Some other helper classes include:
```csharp
public XPathNodeIterator GetExpensiveBooks(IXPathNavigable doc, int minPrice)
{
string expr = "//mvp:titles[mvp:price > $price]";
// XPathCache optimally caches the compiled XPath expression and parameterizes it
return XPathCache.Select(expr, doc.CreateNavigator(), mgr, new XPathVariable("price", minPrice));
}
```
```csharp
var xslt = new XslTransform();
xslt.Load("print_root.xsl");
var doc = new XPathDocument("library.xml");
var books = doc.CreateNavigator().Select("/library/book");
while (books.MoveNext())
{
// Transform subtree for current node
xslt.Transform(new SubtreeeXPathNavigator(books.Current), null, Console.Out, null);
}
```
# Sponsors
[](https://github.com/clarius)
[](https://github.com/MFB-Technologies-Inc)
[](https://github.com/drivenet)
[](https://github.com/Keflon)
[](https://github.com/tbolon)
[](https://github.com/kfrancis)
[](https://github.com/unoplatform)
[](https://github.com/rbnswartz)
[](https://github.com/jfoshee)
[](https://github.com/Mrxx99)
[](https://github.com/eajhnsn1)
[](https://github.com/davidjenni)
[](https://github.com/Jonathan-Hickey)
[](https://github.com/akunzai)
[](https://github.com/KenBonny)
[](https://github.com/SimonCropp)
[](https://github.com/agileworks-eu)
[](https://github.com/arsdragonfly)
[](https://github.com/vezel-dev)
[](https://github.com/ChilliCream)
[](https://github.com/4OTC)
[](https://github.com/v-limo)
[](https://github.com/DominicSchell)
[](https://github.com/jwendl)
[](https://github.com/adalon)
[](https://github.com/Eule02)
[](https://github.com/henkmartijn)
[](https://github.com/torutek)
[](https://github.com/mccaffers)
[](https://github.com/sponsors/devlooped)
[Learn more about GitHub Sponsors](https://github.com/sponsors)