Thank both Bruno and Michele. 

I just tried you second suggestion Michele but still got an ticket. But by 
changing places of str and TAG and adding flatten() I got what I wanted. 

XML(TAG(str(elements[9])).flatten())


Kenneth


use beatifulsoup a one stop shop for html mangling 
> http://www.crummy.com/software/BeautifulSoup/ 
>
> or try this: 
>
> XML(str(TAG(elements[9])) 
>
> mic 
>
> 2013/2/18 Bruno Rocha <[email protected] <javascript:>>: 
> > 
> > 
> > 
> http://stackoverflow.com/questions/9662346/python-code-to-remove-html-tags-from-a-string
>  
> > 
> > -- 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "web2py-users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] <javascript:>. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to