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

## org.basex.build.xml
Class XMLScanner

    java.lang.Object
      org.basex.build.xml.XMLScanner

    public final class XMLScanner

extends java.lang.Object

This class scans an XML document and creates atomic tokens.

Author:
  Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Constructor Summary
`XMLScanner(BufferInput in)` Initializes the scanner.
`XMLScanner(java.lang.String file)` Constructor.

Method Summary
`void` | `finish()` Finishes file scanning.
`static void` | `main(java.lang.String[] args)` Main method; used for testing purposes.
`boolean` | `more()` Returns true if the document scanning has been completed.
`void` | `next()` Reads and interprets the next token from the input stream.
`void` | `prevChar(int p)` Jumps the specified number of characters back.
`void` | `scan()` Read and interpret all tokens from the input stream.
`static boolean` | `valid(int ch)` Checks if the specified character is an XML whitespace.
`static boolean` | `whitespace(int ch)` Checks if the specified character is an XML whitespace.

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

Constructor Detail

### XMLScanner

    public XMLScanner(BufferInput in)

  Initializes the scanner.

  Parameters:
    `in` - input stream

### XMLScanner

    public XMLScanner(java.lang.String file)
               throws java.io.IOException

  Constructor.

  Parameters:
    `file` - input file
  Throws:
    `java.io.IOException` - I/O Exception

Method Detail

### finish

    public void finish()
                throws java.io.IOException

  Finishes file scanning.

  Throws:
    `java.io.IOException` - I/O Exception

### main

    public static void main(java.lang.String[] args)

  Main method; used for testing purposes.

  Parameters:
    `args` - command line arguments

### more

    public boolean more()

  Returns true if the document scanning has been completed.

  Returns:
    true if the document scanning has been completed.

### next

    public void next()
              throws BuildException

  Reads and interprets the next token from the input stream.

  Throws:
    `BuildException` - Build Exception

### prevChar

    public void prevChar(int p)

  Jumps the specified number of characters back.

  Parameters:
    `p` - number of characters

### scan

    public void scan()
              throws BuildException

  Read and interpret all tokens from the input stream.

  Throws:
    `BuildException` - Build Exception

### valid

    public static boolean valid(int ch)

  Checks if the specified character is an XML whitespace.

  Parameters:
    `ch` - the letter to be checked
  Returns:
    result of comparison

### whitespace

    public static boolean whitespace(int ch)

  Checks if the specified character is an XML whitespace.

  Parameters:
    `ch` - the letter to be checked
  Returns:
    result of comparison

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