Thanks much! TextNode is something I missed out on. (I didnt realize text inside a node was modeled as a Node silly me) Original message From:Derrick Oswald< der...@gm... >Date: 18 Feb 10 11:04:51Subject:Re: [Htmlparseruser] query on how to read "data" for a particular TagNodeTo: Rajorshi Biswas , htmlparser user list If you have the div tag, then since it is a composite node, "
foo
" will be the first child:divtag.getChildren ()[0]On Thu, Feb 18, 2010 at 5:16 AM, Rajorshi Biswaswrote: 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 else My 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!Raj Dear htmlparseruser! Get Yourself a cool, short @in.com Email ID now! Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and finetune appli
cations for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intelswdev Htmlparseruser mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlparseruser
|