cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving HTML tags independent contents from alfresco

mrinal3199
Champ in-the-making
Champ in-the-making
Hi,
   I have a problem. It might not be related to alfresco but as i am trying this in alfresco so, lease help me out in this. I am retrieving a property(content field) value of a content from alfresco which may have html tags appended to them. I am retrieving it using content reader in java. And so, i am getting the content value along with html tags appended to it. Can any one please suggest me a way to remove all html tags and to get just the content part of that. For example: if a content value i am getting as "Test" which is appended with some html tags say p tag or ul tag etc., i want to get only "Test" from it. There may be other html tags even appended to it which is limitless.

Thanks,
1 REPLY 1

kaynezhang
World-Class Innovator
World-Class Innovator
You may have several options:
   1.use html parser library,for example  NekoHTML
   2.use regular expression to remove HTML tags from your content.
I recommend regular expression