D
DRS.Usenet
I looked at parserapplications "LinkExtractor" and "StringExtractor" -
got them running - but they are not exactly what I need, really.
Situation 1:
Given this in the html:
<DIV class=someclass>I want this text here</DIV>
I've been able to make a new NodeClassFilter(Div.class), and spin
through all nodes that match and check tag.getAttribute("class"). When
I find "someclass", I know I'm where I want to be, but I don't know
what to do to get the text inside the DIV. Which example (if any)
shows that?
Situation 2:
Given this in the html:
<P><A name=someTitle><SPAN>SomeTitle</SPAN><BR>
Item 1, <a href="/somepath/some.html">Item 2</a>,Item 3<BR>
<P>...
I would like to get something equal to:
String[] hGrail = {"Item 1", "Item 2", "Item 3"};
On this one, I have no ideas. I've tried to look at how the "<a
href=..." has been done, but didn't get very far.
Please, any examples or pointers to examples.
--Dale--
got them running - but they are not exactly what I need, really.
Situation 1:
Given this in the html:
<DIV class=someclass>I want this text here</DIV>
I've been able to make a new NodeClassFilter(Div.class), and spin
through all nodes that match and check tag.getAttribute("class"). When
I find "someclass", I know I'm where I want to be, but I don't know
what to do to get the text inside the DIV. Which example (if any)
shows that?
Situation 2:
Given this in the html:
<P><A name=someTitle><SPAN>SomeTitle</SPAN><BR>
Item 1, <a href="/somepath/some.html">Item 2</a>,Item 3<BR>
<P>...
I would like to get something equal to:
String[] hGrail = {"Item 1", "Item 2", "Item 3"};
On this one, I have no ideas. I've tried to look at how the "<a
href=..." has been done, but didn't get very far.
Please, any examples or pointers to examples.
--Dale--