D
D
Dmitry2016-04-04 20:47:59
ASP.NET
Dmitry, 2016-04-04 20:47:59

What is faster to parse?

Guys, the desired language is C #, this question arose, what is faster to parse, more precisely, what will be faster, HtmlAgilityPack or use Regular expressions? If you can tell why it will be faster? What will be more convenient? Are there any other technologies for parsing?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
akass, 2016-04-04
@akass

HtmlAgilityPack is deprecated already, AngleSharp will be better

S
Stanislav Makarov, 2016-04-04
@Nipheris

HtmlAgilityPack or use regular expressions?

stackoverflow.com/a/1732454/3927447
That says it all.

L
lanzay, 2016-04-13
@lanzay

Is there a native HTML parser in C#? (I'm a beginner)
as far as I understand, there are only a few solutions:
1. XmlDocument - native, but stumbles over unclosed tags
2. regular expressions - effective, but you can't walk around the DOM
3. AngleSharp - I'll look
4. WebKit - can do a lot, but something it is not very popular in .NET solutions
, ideally it would be convenient to have 1 library in which you can optionally:
1. work with the DOM, including with unclosed tags
2. work with JavaScript - turned on turned off processing and loading
3. well, all kinds of React and Ajax on scrolls and clicks
4. and selectors like in jQuery so
that there are any such tools at all (and still with documentation)?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question