Use Tiday to convert HTML to DOM document and work with XQuery - http://www-128.ibm.com/developerworks/library/j-jtp03225.html