Subj : Re: (How to parse markup) To : netscape.public.mozilla.jseng From : Shanti Rao Date : Sat Jul 17 2004 10:10 am Here's my recipe: 1. Scan input until you encounter a <. Write all skipped characters to output. 2. When you find a <, read the next character. If it's whitspace, send the < and the space to output. Goto 1. 3. If it's a punctuation symbol, ignore the tag and send it to output. You don't want to parse , etc. 4. If it's not whitespace, it's the first character of the tag name. Keep reading from input until you reach whitespace, /, or >. 5. If the tag is terminated by whitespace, read attributes. Create a new object to be the hash table. Call Read Attributes. 6. Note whether the tag ended with /> or just >. Sub Read Attributes 1. Read attribute name until any of "= \t\r\n/>" 2. If whitespace, skip to non-ws character 3. If / or >, tag is finished. Return. 4. If =, attribute value comes next. 5. Read from input until non-whitespace 6. If " or ', read until matching quote symbol. Goto 1. 7. Read until whitespace or / or > 8. If /, read until > 9. Done if >, else goto 1. Axel Bernhardt wrote: > hello, > > has anybody experience with preparsing html? > i'm looking through httpUnit, try to work with jTidy. but i have no idea, where to start. > > my js to be parsed is like that: > > > has anybody an example or a few codelines, how to start with parsing? i know, i asked before, but i still got no idea. > > > Thanks for helping, > juppi > > _______________________________________________________ > WEB.DE Video-Mail - Sagen Sie mehr mit bewegten Bildern > Informationen unter: http://freemail.web.de/?mc=021199 > .