[Htmlparser-user] query on how to read "data" for a particular TagNode
Brought to you by:
derrickoswald
From: Rajorshi B. <raj...@in...> - 2010-02-18 04:17:11
|
Hello, I am new to htmlparser, so please forgive me if this is a naive question. I have an HTML fragment for which I need to determine if the first visible text is in bold or not. For this, I am trying to get the 'first' text content of the fragment. Suppose the fragment is of the following form: foo something something elseMy question is: how do I get the "data" portion of the 'div'. That is, when I arrive at the "div" node (Div object), I wish to retrieve the content of the div WITHOUT its children elements I wish to retrieve "foo" in this case. I could not find an API in the Node/TagNode classes for this. Could anyone please help me out here?Thanks in advance!RajDear htmlparseruser! Get Yourself a cool, short @in.com Email ID now! |