osscameroon / js-generator

Generates JavaScript from HTML
https://osscameroon.github.io/js-generator/
MIT License
19 stars 14 forks source link

Jsoup Self Closing Tag Issue #191

Closed FanJups closed 1 year ago

FanJups commented 1 year ago

https://github.com/jhy/jsoup/issues/1838

FanJups commented 1 year ago

There is an issue (based on our goal not jsoup issue) when using xmlParser. On the other hand, hmlParser has no issue. We use xml instead of html parser because html parser adds html,head and body tags but we don't want that. We used xml then added a logic to get a similar result we got using htmlParser but without html,head and body tags.

There are 2 branches with examples in order to better understand:

xmlParser: https://github.com/osscameroon/js-generator/tree/basic-illustration-of-self-closing-tag-issue

htmlParser: https://github.com/osscameroon/js-generator/tree/basic-illustration-of-self-closing-tag-issue-htmlparser