Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Beginning Java and the fly likes Handling Html tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Handling Html tag" Watch "Handling Html tag" New topic
Author

Handling Html tag

Hui Zhao
Ranch Hand

Joined: Jul 09, 2007
Posts: 116
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

Joined: Jun 03, 2005
Posts: 228
Could you post more details about your question?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 9077
    
    9

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.


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling Html tag