lexborisov / myhtml

Fast C/C++ HTML 5 Parser. Using threads.
GNU Lesser General Public License v2.1
1.66k stars 147 forks source link

xpath support #191

Open MohammadRaziei opened 1 year ago

MohammadRaziei commented 1 year ago

hi. Could you support Xpath? I know xpath support may be complicated but I need a relaxed version of xpath. each node of elements must have a path (like xpath) and we can get that value of xpath. also need a dictionary (map) to search nodes by their xpath (something like bidiectional map or using two map). maybe it hava some effects on its performance. but you can handle it by some flags in constructor that imply to support it or not.

I want to write a python api for myhtml and I really need this method

lexborisov commented 1 year ago

@MohammadRaziei

Unfortunately, the myhtml project is not and will not be supported. Only PRs in the form of fixes are accepted.

For a really fast parsing of HTML, use the lexbor library. Try using CSS Selectors for your tasks. Please, see spec.

wonkyDD commented 1 year ago

@lexborisov what's the difference lexbor and myhtml ?

Do you recommend using lexbor, which is still maintained? If not, why not?

lexborisov commented 1 year ago

@wonkyDD

lexbor is DOM, HTML, CSS, encoding and so on. myhtml is only HTML.

lexbor is being developed and maintained. myhtml does not develop and is not supported.