A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
Handling Html tag
Joined: Jul 09, 2007
Oct 10, 2007 19:33:00
I have a html file that is like
<h5>Views</h5> <div class="pBody"> <ul> <li id="ca-nstab-main" class="selected"><a href="/wiki/Hacker" title="View the content page [c]" accesskey="c">Article</a></li>
I want to add an id to each line.
How to add it with html tag function?
I am not strong on it.
HTMLEditorKit.ParserCallback handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos)
I need a piece of codes.
Joined: Jun 03, 2005
Oct 11, 2007 07:11:00
Could you post more details about your question?
Joined: Oct 29, 2001
Oct 11, 2007 08:06:00
The HTML parser provided in the JDK can run through a document and fire off events for each tag but it cannot edit the document. Have a look at
, which has methods for inserting and deleting content.
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
How To Ask Questions On JavaRanch
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Handling Html tag
Hiding child element - IE works, but Mozilla no
Help Clean up This Code
Embedding Lists in XHTML
Can you read this?
How to compute the count of html_tag each line?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013