Merge branch 'master' into dev
This commit is contained in:
Коммит
15d81d5767
29
README.md
29
README.md
|
@ -14,30 +14,11 @@ AngleSharp Diffing makes it possible to compare AngleSharp _control_ nodes and _
|
|||
|
||||
The _control_ nodes represents the expected HTML tree, i.e. how the nodes are expected to look, and the _test_ nodes represents the nodes that should be compared to the _control_ nodes.
|
||||
|
||||
**Differences:** There are three types off `IDiff` differences, that the library can return.
|
||||
|
||||
- `NodeDiff`/`AttrDiff`: Represents a difference between a control and test node or a control and test attribute.
|
||||
- `MissingNodeDiff`/`MissingAttrDiff`: Represents a difference where a control node or control attribute was expected to exist, but was not found in the test nodes tree.
|
||||
- `UnexpectedNodeDiff`/`UnexpectedAttrDiff`: Represents a difference where a test node or test attribute was unexpectedly found in the test nodes tree, but did not have a match in the control nodes tree.
|
||||
|
||||
# Usage
|
||||
To find the differences between a control HTML fragment and a test HTML fragment, using the default options, the easiest way is to use the `DiffBuilder` class, like so:
|
||||
|
||||
```csharp
|
||||
var controlHtml = "<p>Hello World</p>";
|
||||
var testHtml = "<p>World, I say hello</p>";
|
||||
var diffs = DiffBuilder
|
||||
.Compare(control)
|
||||
.WithTest(test)
|
||||
.Build();
|
||||
```
|
||||
|
||||
Read more about the available options on the [Options](/docs/Options.md) page.
|
||||
|
||||
# Documentation
|
||||
- [Options](/docs/Options.md)
|
||||
- [Creating custom diffing options](/docs/CustomOptions.md)
|
||||
- [Difference engine internals](/docs/DiffingEngineInternals.md)
|
||||
### Documentation:
|
||||
- [Getting started](https://github.com/AngleSharp/AngleSharp.Diffing/wiki/Getting-Started)
|
||||
- [Diffing options](https://github.com/AngleSharp/AngleSharp.Diffing/wiki/Diffing-Options)
|
||||
- [Creating custom diffing strategies](https://github.com/AngleSharp/AngleSharp.Diffing/wiki/Getting-Started)
|
||||
- [Difference Engine Internals](https://github.com/AngleSharp/AngleSharp.Diffing/wiki/Difference-Engine-Internals)
|
||||
|
||||
## Acknowledgments
|
||||
- [Florian Rappl](https://github.com/FlorianRappl) from the AngleSharp team for providing ideas, input and sample code for working with AngleSharp.
|
||||
|
|
Загрузка…
Ссылка в новой задаче