Package org.eclipse.lemminx.dom.parser

## Class XMLScanner

- java.lang.Object
- - org.eclipse.lemminx.dom.parser.XMLScanner

All Implemented Interfaces:
  `Scanner`

    public class XMLScanner
    extends Object
    implements Scanner

XML scanner implementation.

### Constructor Summary

Constructors
`XMLScanner​(String input, int initialOffset, ScannerState initialState, boolean isDTDFile)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static Scanner` `createScanner​(String input)`
`static Scanner` `createScanner​(String input, boolean isDTD)`
`static Scanner` `createScanner​(String input, int initialOffset)`
`static Scanner` `createScanner​(String input, int initialOffset, boolean isDTDFile)`
`static Scanner` `createScanner​(String input, int initialOffset, ScannerState initialState)`
`static Scanner` `createScanner​(String input, int initialOffset, ScannerState initialState, boolean isDTDFile)`
`int` `getLastNonWhitespaceOffset()`
`ScannerState` `getScannerState()`
`int` `getTokenEnd()` Ending offset position of the current token
`String` `getTokenError()`
`int` `getTokenLength()`
`int` `getTokenOffset()` Starting offset position of the current token
`String` `getTokenText()`
`String` `getTokenTextFromOffset​(int offset)`
`TokenType` `getTokenType()`
`boolean` `isTokenTextBlank()`
`TokenType` `scan()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### XMLScanner

    public XMLScanner​(String input,
                      int initialOffset,
                      ScannerState initialState,
                      boolean isDTDFile)

### Method Detail

#### scan

    public TokenType scan()

Specified by:
  `scan` in interface `Scanner`

#### getLastNonWhitespaceOffset

    public int getLastNonWhitespaceOffset()

#### getTokenType

    public TokenType getTokenType()

Specified by:
  `getTokenType` in interface `Scanner`

#### getTokenOffset

    public int getTokenOffset()

Description copied from interface: `Scanner`
Starting offset position of the current token

Specified by:
  `getTokenOffset` in interface `Scanner`
Returns:
  int of token's start offset

#### getTokenLength

    public int getTokenLength()

Specified by:
  `getTokenLength` in interface `Scanner`

#### getTokenEnd

    public int getTokenEnd()

Description copied from interface: `Scanner`
Ending offset position of the current token

Specified by:
  `getTokenEnd` in interface `Scanner`
Returns:
  int of token's end offset

#### getTokenText

    public String getTokenText()

Specified by:
  `getTokenText` in interface `Scanner`

#### isTokenTextBlank

    public boolean isTokenTextBlank()

Specified by:
  `isTokenTextBlank` in interface `Scanner`
Returns:
  True if the token's Text is empty or all whitespace

#### getScannerState

    public ScannerState getScannerState()

Specified by:
  `getScannerState` in interface `Scanner`

#### getTokenError

    public String getTokenError()

Specified by:
  `getTokenError` in interface `Scanner`

#### getTokenTextFromOffset

    public String getTokenTextFromOffset​(int offset)

#### createScanner

    public static Scanner createScanner​(String input)

#### createScanner

    public static Scanner createScanner​(String input,
                                        boolean isDTD)

#### createScanner

    public static Scanner createScanner​(String input,
                                        int initialOffset)

#### createScanner

    public static Scanner createScanner​(String input,
                                        int initialOffset,
                                        boolean isDTDFile)

#### createScanner

    public static Scanner createScanner​(String input,
                                        int initialOffset,
                                        ScannerState initialState)

#### createScanner

    public static Scanner createScanner​(String input,
                                        int initialOffset,
                                        ScannerState initialState,
                                        boolean isDTDFile)