B
burgermeister01
Hi,
I'm working on a school project, and I was hoping to get some
suggestions from the group. As part of a project I need a program to be
able to go to dictionary.com and look up a word a user specifies and
return the definition. So far I've figured out how to pull data from a
URL, and I can get a page's HTML code no problem. The next step, which
is displaying the text is what is given me a problem. How can I rip out
just the HTML that I want and leave all the rest behind? So far, my
best idea is just to use some very clever and maticulous text parsing,
but that seems tedious and unreliable (what if dictionary.com makes a
change to their HTML code?). Is there an easier way that I don't know
of? Keep in mind that I have to be able to display this text to a
command line and a GUI so if Java has some kind of built-in HTML
reader, that would only half work.
I'm working on a school project, and I was hoping to get some
suggestions from the group. As part of a project I need a program to be
able to go to dictionary.com and look up a word a user specifies and
return the definition. So far I've figured out how to pull data from a
URL, and I can get a page's HTML code no problem. The next step, which
is displaying the text is what is given me a problem. How can I rip out
just the HTML that I want and leave all the rest behind? So far, my
best idea is just to use some very clever and maticulous text parsing,
but that seems tedious and unreliable (what if dictionary.com makes a
change to their HTML code?). Is there an easier way that I don't know
of? Keep in mind that I have to be able to display this text to a
command line and a GUI so if Java has some kind of built-in HTML
reader, that would only half work.