It all depends on what you want to achieve. It is usually better to use the DOM for parsing HTML/XML. In few occasions where you can't load it due to parsing errors, a regular expression may get you there, but it can also cause a lot of headaches. Some things just are not possible with a regular expression.
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
Do a speed test and find out. Using the DOM will be more reliable.
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875