I like the Quiotix Parser because it provides a slick visitor interface which I prefer over walking the DOM. I have some description of visitor and a link to Quiotix from HERE. In short, you'd parse an HTML string and write a visitor to extract any attributes you like from all the nodes.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi