What is parsing?

2019-01-30 06:35发布

Parsing is something I came accross alot in development, but as a junior its one of those things I assume I will get the hang of at some point, when its needed. In my current project I've been told to find and use an HTML parser for a certain function, I have found a couple on the web, but what does an HTML parser actually do? And what does it mean to parse an object??

8条回答
叼着烟拽天下
2楼-- · 2019-01-30 07:02

A parser is a compiler / interpreter component that breaks data into smaller elements for easy translation into another language. A parser takes input in the form of a sequence of tokens or program instructions and usually builds a data structure in the form of a parse tree or an abstract syntax tree.

查看更多
该账号已被封号
3楼-- · 2019-01-30 07:05

It is the process of identifying the tokens [tags, attributes] inside an HTML.

查看更多
登录 后发表回答