🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

AngleSharp.Xml

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

AngleSharp.Xml

Adds a powerful XML and DTD parser to AngleSharp.

1.0.0
NuGet
Version published
Maintainers
1
Created
Source

logo

AngleSharp.Xml

CI GitHub Tag NuGet Count Issues Open Gitter Chat StackOverflow Questions CLA Assistant

AngleSharp.Xml extends the core AngleSharp library with some XML capabilities. This repository is the home of the source for the AngleSharp.Xml NuGet package.

Basic Configuration

If you just want a configuration that works you should use the following code:

var config = Configuration.Default
    .WithXml(); // from AngleSharp.Xml

This will register a parser for XML related content.

XML Parser

Alternatively, you can also the XmlParser directly:

var parser = new XmlParser();
parser.ParseDocument(@"<?xml version=""1.0"" encoding=""ISO-8859-1""?>
    <note>
        <to>Tove</to>
        <from>Jani</from>
        <heading>Reminder</heading>
        <body>Don't forget me this weekend!</body>
    </note>"
);

The XmlParser supports a variety of options, most notably it can suppress (i.e., not throw on) errors.

Advantages of AngleSharp.Xml over System.Xml

The main advantage is that AngleSharp.Xml is part of the AngleSharp ecosystem and integrates well, e.g., by allowing remove XML files to be loaded, interpreting SVG documents or XHTML. A major point is AngleSharp.Xml also contains parts of a DTD parser, which could be used to validate XML documents.

Finally, the integration of AngleSharp.Xml in AngleSharp means that not only HTML documents may refer or use XML freely, but also the other way round. This is therefore as close to XML in a browser as you may get in .NET.

Features

  • Fully compliant XML parser
  • XML DOM similar to HTML(5)
  • DTD parser and validation check
  • XML serialization

Participating

Participation in the project is highly welcome. For this project the same rules as for the AngleSharp core project may be applied.

If you have any question, concern, or spot an issue then please report it before opening a pull request. An initial discussion is appreciated regardless of the nature of the problem.

Live discussions can take place in our Gitter chat, which supports using GitHub accounts.

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.

For more information see the .NET Foundation Code of Conduct.

.NET Foundation

This project is supported by the .NET Foundation.

License

The MIT License (MIT)

Copyright (c) 2020 - 2023 AngleSharp

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.

Keywords

html

FAQs

Package last updated on 15 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts