Andy Williams (IMAP HILLWAY) wrote:
I need to parse an HTML file [0] and pull out all the form elements and
put them into a data structure. What I can't seem to do is when I have
found a <select> tag is then parse the associated <option> tags!

When you see the start select, you set a flag to say you're in a select. Then when you see an option, if you're in a select you add its data to the structure that corresponds to the current select. One the end of the select, you clear it (to avoid dealing with stray options).


--
Robin Berjon <[EMAIL PROTECTED]>
Research Engineer, Expway        http://expway.fr/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488




Reply via email to