A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Elasticsearch in Action
this week in the
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.
How To Ask Questions On JavaRanch
I agree. Here's the link:
subject: Handling Html tag
Help Clean up This Code
Can you read this?
Hiding child element - IE works, but Mozilla no
How to compute the count of html_tag each line?
Embedding Lists in XHTML
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015