This content has been marked as final. Show 7 replies
So you need HTML parser. Please write parser name, which you use now.
Thanks for the reply,
I also tried with jsoup, it is very fast but, i want to remove all html tags and replace all anchot tags in the file with the url in the href of an anchor tag.
And the performance should be also very faster.
I do not know it will affect or not, I am interesting get data from html with my regexs
976815 wrote:Sorry, I am not qualified to mention the BEST and FASTEST way to do it. But when you want to lower your standards and ask for a solution which just works, feel free to come again.
The simplest way to get your application to run faster is to get a faster computer.
how can I replace the anchor tag in a string, by the url in the href of that anchor tag by using jsoup,
suppose input text is :
test, string using, dsfg, 1:14 PM, < a t a r ge t="_ablank" s t y l e = " color: red" h r e f = " h t t p : / / t e s t u r l . c o m / i n d e x . j s p ? a = 1 2 3 4 " > s u p p o r t < / a >, s c h e d u l a r t a g , < a t a r g e t = " _ vbblank " s t y l e = " c o l o r : g r e e n " h r e f = " h t t p : / / t e s t u r l g r e e n . c o m / i n d e x . j s p ? a = a s d f a s df 4 " > s u pp o r t r e q < / a > a s d f pq r
then out put text should be :
test, string using, dsfg, 1:14 PM, http://testurl.com/index.jsp?a=1234, schedular tag, http://testurlgreen.com/index.jsp?a=asdfasdf4 asdf pqr
Please help at the earliest..
Thanks in advance
as this text editor is not supporting html anchor tag the example is not displaying correctly
Edited by: 976815 on Dec 17, 2012 5:17 AM
Parse it to a DOM and run it through an XSLT or an XPath. Not the fastest but certainly the easiest to implement.