Похожие чаты

But the question aside, how is a DOM parser written?

What algorithms and data structures are used?

One way I came to think of was to traverse the string and find the first occurrence of the closing tag: </ul> then check if there are other beginning tags <ul in between and expand the traversing range.

I wasn't able to find a good article on web, I guess I have to look through available libraries to learn. This is like a riddle for me

11 ответов

15 просмотров

Does it matter? You won't be writing one, will you?

you don't want to role your own, do you? Sounds like a bad idea if all you want is to parse some HTML to solve a business issue

ㅤ- Автор вопроса
Roman Sharkov
you don't want to role your own, do you? Sounds li...

Not for this project, I'm just curious on the way its achieved. That might train my brain for same problems :D


Not for this project, I'm just curious on the way ...

You'd probably be writing a recursive descent parser, it's quite fun btw

ㅤ- Автор вопроса
Roman Sharkov
You'd probably be writing a recursive descent pars...

It does sound fun, I'm already looking into it. I hope by fun you didn't mean the quantum physic formulas


It does sound fun, I'm already looking into it. I ...

it ain't that difficult, also not quite trivial tho and a little time consuming

ㅤ- Автор вопроса

What doesn't kill you makes you stronger

time kills you, there ain't enough of it 😅

ㅤ- Автор вопроса
Roman Sharkov
time kills you, there ain't enough of it 😅

Who said this is the only time we live in. I'll die and born a better programmer

ㅤ- Автор вопроса
Roman Sharkov
highly doubt it's possible 😅

It's how I calm myself when I'm reminded of the time

Похожие вопросы

Обсуждают сегодня

@LGCYMan @JustinKKW Q/A List 1. this part confuses me on #8: "From there, a bridge between erc20 LGXY and erc20 LGXY will be out once that swap is closed." does this mean ...
Sig | LGCY | BattleVerse L1 | BitWin
1
Did @Beeker really get banned? That's ridiculous. He's one of the few left here with half a brain and you might not always like his narrative @dgb_ycagel , but he often keeps ...
Leroy Gerrits
1
async login(req: Request, res: Response, next: NextFunction): Promise<void> { try { const { errors, input } = await RequestValidator(LoginRequest, req.body...
. .
1
Anyone here suffers from unexplained aural migraines, who would be up for talking for a bit? Doesn't *have* to be aural, but I am not asking about headaches, I mean actual mi...
Martin Rys
55
Я тут за тем, чтобы задать вопрос, так как не знаю ассемблер, учу с/с++. Короче, насколько дорога операция перехода в функцию при ее вызове? Дело в том, что в с++ есть макросы...
Максим Рябцев
11
hello friends. Do you know how can I learn getx? I have a software project that I should deliver it up to 5 weeks later and I need to learn firebase too. I will be thankfull
AmirHossein Razavi
15
Доброе время суток! у меня тут иноды закончились. и понял почему по сути кстит, я периодически очищаю постгрес и сентри контайнер: postgres=# DELETE FROM nodestore_node WHER...
Юсиф Насиров
9
A couple thoughts from a random internet stranger: 1. If you want this project to gain traction you cannot keep being negative. If I just came here after finding out about Kd...
Eric Wild
46
Привет, нужен совет старших товарищей. Есть глобальная переменная var DefaultDataFolder:string; инициализируем DefaultDataFolder:='a:\_OUT\'; есть примитивная процедур...
Max Otto
14
Hello guys, I have staked Matic as stMatic via Lido nearly a year ago and recently I wanted to unstake but the platform offered me to unstake via Kyberswap for a faster trans...
Mike
7
Карта сайта