Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling Html tag

 
Hui Zhao
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a html file that is like

I want to add an id to each line.
How to add it with html tag function?
I am not strong on it.

I need a piece of codes.
Thanks
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post more details about your question?
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 HTMLEditorKit, which has methods for inserting and deleting content.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic