Forums Register Login

Creating HTML Parser

+Pie Number of slices to send: Send
As a my final year project i created Web Browser, but with the help of third party parser, so as a part of further development i want to write a HTML parser in java.. But i don't know how to proceed.. Please help me with this.
+Pie Number of slices to send: Send
Have you listed all the features your parser should have?
+Pie Number of slices to send: Send
I'd start by checking some existing open source Java HTML parsers. If you can't use them directly in your code, you can at least check out how they've done it.
+Pie Number of slices to send: Send
Um..wouldn't that defeat the purpose of writing your own parser?
+Pie Number of slices to send: Send
I'm not saying the entire code should be copy-pasted, but it could be used for hints on how to do it. For something like this, I wouldn't completely reinvent the wheel, not even as part of a school project.
+Pie Number of slices to send: Send
I want to try developing my own parser, HTML parser with minimum functionality and then moving towards advanced functionality.. but i'm not getting how i can proceed, or what first move i should take
+Pie Number of slices to send: Send
First of all you need to know how parsers work in general. Next you need to decide whether you want to do strict parsing (i.e. reject anything which doesn't conform to the HTML spec) or lenient parsing (i.e. accept anything which vaguely resembles HTML). Then you need a grammar for whatever you decided there. Finally you need to write a parser based on that grammar.
+Pie Number of slices to send: Send
Thanks Paul..

Please suggest me some material regarding how parser work in general, because i searched for it and it is hard to get it..
+Pie Number of slices to send: Send
Am I correct in guessing that you know approximately nothing about parsers? Then start with the Wikipedia article: Parser.
+Pie Number of slices to send: Send
I'm an software engineer, and i know about parser ( concept i learned from compiler construction course), as a theoretical part, i know how to create grammar too, but i never tried for designing parser before so..
+Pie Number of slices to send: Send
Okay, then it shouldn't be a problem. Just be aware that it's going to be a significant amount of work, so asking vague and general questions on forums is unlikely to advance that process.
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 798 times.
Similar Threads
Parsing HTML 4.0 files using the swing HTML Parser
Parsing HTML
HTML parser
HTML Parsing Issue
HTML Parser
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 20:23:17.