How to clean up some unwanted HTML attributes in crawler data

for example, for the following data

<p id="a">data

I just want to keep

data

is there a quick way to do this?


idea:
1 get the current element name,p
2 get the current element text,data
3 assemble into < element_name > text < / element_name >

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9f775-1a60.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9f775-1a60.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?