HTML Parser
Posted: Thu May 24, 2018 9:52 pm
Here are HTML parser functions in JustBasic. Eventually, this will include all that is needed to equip a rendering engine.
It will include:
--GetNextElement() ~Finds an element, and returns that along with the text before and after it. It finds the first element present. Elements may be present in text after the element found, so it returns that as well.
--GetAttributes() ~Processes attributes in the element found by GetNextElement()
I beleive that this is all that is needed to parse an HTML file for a rendering engine. Please reply if you have found any bugs or have a way to improve things. I am also going to work on a JB rendering engine (once these parsing functions are complete)!
It will include:
--GetNextElement() ~Finds an element, and returns that along with the text before and after it. It finds the first element present. Elements may be present in text after the element found, so it returns that as well.
--GetAttributes() ~Processes attributes in the element found by GetNextElement()
I beleive that this is all that is needed to parse an HTML file for a rendering engine. Please reply if you have found any bugs or have a way to improve things. I am also going to work on a JB rendering engine (once these parsing functions are complete)!