Package com.nt.udc.io.xml
Class CXMLScanner
java.lang.Object
com.nt.udc.io.xml.CXMLScanner
This class converts XML input into XML tokens.
Any errors are reported.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected char[]
/** This member is a temporary buffer used to build strings.protected char[]
This member is used as a buffer to read characters from the data source into.protected int
This member represents the current line number is the source file.protected static int
protected char
This member represents the first character of the next XML token.protected IDataSource
This member represents the input data source for XML tokens.protected ILogger
This member is used to report errors and warnings.protected int
protected int
This member represents the actual number of characters loaded into m_crtLine.protected int
This member represents the allocated length of m_buf. -
Constructor Summary
ConstructorsConstructorDescriptionCXMLScanner
(IDataSource iDataSource) CXMLScanner
(IDataSource iDataSource, ILogger iLogger) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
final int
static int
protected void
init
(IDataSource iDataSource, ILogger iLogger) static void
setDebugLevel
(int debugLevel) boolean
start()
-
Field Details
-
m_debugLevel
protected static int m_debugLevel -
m_iLogger
This member is used to report errors and warnings. -
m_iDataSource
This member represents the input data source for XML tokens. -
m_firstChar
protected char m_firstCharThis member represents the first character of the next XML token. -
m_crtLine
protected char[] m_crtLineThis member is used as a buffer to read characters from the data source into. -
m_lineIndex
protected int m_lineIndex -
m_lineLen
protected int m_lineLenThis member represents the actual number of characters loaded into m_crtLine. -
m_crtLineNumber
protected int m_crtLineNumberThis member represents the current line number is the source file. -
m_buf
protected char[] m_buf/** This member is a temporary buffer used to build strings. -
m_maxBuf
protected int m_maxBufThis member represents the allocated length of m_buf.
-
-
Constructor Details
-
CXMLScanner
- Parameters:
iDataSource
- - Object implementing IDataSource interface - used for getting characters one by oneiLogger
- - Object implementing ILogger interface - used for logging errors, warnings, etc.
-
CXMLScanner
-
-
Method Details
-
getDebugLevel
public static int getDebugLevel() -
getCurrentLine
public final int getCurrentLine() -
setDebugLevel
public static void setDebugLevel(int debugLevel) -
start
public boolean start() -
nextToken
- Returns:
- Next token retrieved from the input
-
init
-
error
-
debug
-