With some quick hacking, here is my version.
Pure Actionscript HTML Parser (with thanks to John Resig)
Gary McGhee - Thursday, May 14, 2009
I am writing a Flex ecommerce store that needs to work with Mals Ecommerce. I am posting values to Mals to add to the cart, and the result is a HTML 4.0 page of the shopping cart, which I need to extract some information from. Parsing HTML would be much easier if it could be converted to XML for use with Flex's built in XML parser. At first I tried quoting unquoted attributes, but then found unclosed tags and it all seemed too hard, so I went looking for a HTML parser in ActionScript, with no success. Then i remembered that ActionScript is supposed to be a superset of Javascript, and the amount of serious code being written in Javascript these days continues to surprise me. This led to this Javascript HTML Parser whipped up by Javascript guru and JQuery creator John Resig.
Recent Posts
- SOLUTION: gemcutter "gem migrate" gives "Too many authentication failures"
- SOLUTION: svn: Can't open file '.svn/text-base/somefile.ext.svn-base': No such file or directory
- My core libraries on GitHub
- Flex child components that don't interfere with mouse events
- Pure Actionscript HTML Parser (with thanks to John Resig)
- "svn: No repository found" error with svn+ssh on the same host
- Don't underestimate Radiant CMS
- Hello Magento
- Closet JRubists article
- Flash on the iPhone hypothetical solution
Tags
JRuby iPhone Magento Objective C solution Ruby gems CMS gemcutter Flash subversion Radiant Rails AVM2

Comments
Post has no comments.