in my GWT application, on the client side I have a string containing html. Is there a good way to go about parsing that and finding specific html tags within it and returning the id’s of those tags?
Any help would be much appreciated, thanks!
You could attach your HTML string to the DOM – using Element.setInnerHTML(yourString). That way you’re using the browser’s parser. Attaching it to an invisible element or an invisible iframe should hide whats happening from the user.
This approach can be abused by XSS (cross site scripting) attacks – so you must either trust or sanitize the HTML string.