Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| HTML Parser Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.htmlparser.scanners
Class ScriptScanner

    java.lang.Object
      org.htmlparser.scanners.TagScanner
          org.htmlparser.scanners.CompositeTagScanner
              org.htmlparser.scanners.ScriptScanner

All Implemented Interfaces:
  Scanner, Serializable

public class ScriptScanner
extends CompositeTagScanner

The ScriptScanner handles script code. It gathers all interior nodes into one undifferentiated string node.

See Also:
  Serialized Form

Constructor Summary
`ScriptScanner()` Create a script scanner.

Method Summary
`Tag` | `scan(Tag tag, Lexer lexer, NodeList stack)` Scan for script.

Methods inherited from class org.htmlparser.scanners.CompositeTagScanner
`addChild, createVirtualEndTag, finishTag, isTagToBeEndedFor`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ScriptScanner

    public ScriptScanner()

  Create a script scanner.

Method Detail

### scan

    public Tag scan(Tag tag,
                    Lexer lexer,
                    NodeList stack)
             throws ParserException

  Scan for script. Accumulates nodes returned from the lexer, until </SCRIPT>, <BODY> or <HTML> is encountered. Replaces the node factory in the lexer with a new (empty) one to avoid other scanners missing their end tags and accumulating even the </SCRIPT> tag.

  Specified by:
    `scan` in interface `Scanner`
  Overrides:
    `scan` in class `CompositeTagScanner`
  Parameters:
    `tag` - The tag this scanner is responsible for.
    `lexer` - The source of subsequent nodes.
    `stack` - The parse stack, not used.
  Returns:
    The resultant tag (may be unchanged).
  Throws:
    `ParserException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2004 Somik Raha Mar 14, 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

HTML Parser is an open source library released under LGPL.