Possible duplicate:
You can parse an HTML document and create a DOM tree (java)
Hi, We use to parse xml using DOM, SAX or JDOM. Is there a way to parse an HTML file.
ex: main_file.html
<div class = "Main_Class" id = "Main_id" style = "width =" 100%; height = "100%">
< div class="sub_class" **id = "sub_id_one"** style="width="50%;height="100%"> </div> < div class="sub_class" **id = "sub_id_two"** style="width="50%;height="100%"> </div>
</ DIV
file_two.html
<div style = "position: relative; swim left; width: 24%; height: 100%;>
<input type = "button" class = "button" value = "4" / ">
</ DIV
I want to parse the main file, get the sub_id, and then add the file_two.html file based on the relativ id.
java dom html xml html-parsing
Bibhaw
source share