A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/AngleSharp/AngleSharp.Xml/issues/16 below:

Parser ignoring IsKeepingSourceReferences · Issue #16 · AngleSharp/AngleSharp.Xml · GitHub

Bug Report Prerequisites Description

Running the parser with XmlParserOptions() { IsKeepingSourceReferences = true, } doesn't actually keep the source references, i looked into the source code and while the HtmlParser checks IsKeepingSourceReferences and assignes the source reference correctly as can be seen here

The xml parser never does that, meaning IElement.SourceReference is always null

Steps to Reproduce
  1. Create a XmlParser with XmlParserOptions() { IsKeepingSourceReferences = true, }
  2. Run Parse

**Expected behavior: IElements should have SourceReference set

**Actual behavior: SourceReference is always null

**Environment details: Linux, .NET 6

Possible Solution

Look into how the HtmlDomBuilder handles it and possibly just copy it, (don't know much about the repo so probably just ignore what i said)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4