|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.xml.JCTableXMLParser
This class takes in a stream of data and parses
it under the assumption that it is in the defined XML
format that LiveTable uses. It then passes the data to
the given JCTablePopulator
instance.
The XML LiveTable format looks like this:
<?xml version="1.0"?> <!DOCTYPE JCTableData SYSTEM "JCTableData.dtd"> <JCTableData> <Row> <Cell>1</Cell> <Cell>2</Cell> <Cell>3</Cell> <Cell>4</Cell> </Row> <Row> <Cell>1</Cell> <Cell>2</Cell> <Cell>3</Cell> <Cell>4</Cell> </Row> </JCTableData>Or, with row and column labels:
<?xml version="1.0"?> <!DOCTYPE JCTableData SYSTEM "JCTableData.dtd"> <JCTableData> <ColumnLabel>Column 1</ColumnLabel> <ColumnLabel>Column 2</ColumnLabel> <ColumnLabel>Column 3</ColumnLabel> <ColumnLabel>Column 4</ColumnLabel> <Row> <RowLabel>Row 1</RowLabel> <Cell>1</Cell> <Cell>2</Cell> <Cell>3</Cell> <Cell>4</Cell> </Row> <Row> <RowLabel>Row 2</RowLabel> <Cell>1</Cell> <Cell>4</Cell> <Cell>9</Cell> <Cell>16</Cell> </Row> <Row> <RowLabel>Row 3</RowLabel> <Cell>1</Cell> <Cell>16</Cell> <Cell>81</Cell> <Cell>256</Cell> </Row> </JCTableData>
Field Summary | |
protected boolean |
isDebug
Flag indicating whether parsing is in debug mode, which turns on error messages on error out. |
static String |
XML_DS
|
static String |
XML_DS_COLUMNLABEL
|
static String |
XML_DS_ROW
|
static String |
XML_DS_ROW_CELL
|
static String |
XML_DS_ROWLABEL
|
Constructor Summary | |
JCTableXMLParser()
|
Method Summary | |
protected Object |
cvtToTableValue(String value)
Converts a String from the xml data into a table value. |
void |
readAndParse(Reader r,
com.klg.jclass.util.xml.JCTablePopulator pop)
Reads and parses table data in the defined XML format. |
protected void |
readTableData(Document xml,
com.klg.jclass.util.xml.JCTablePopulator pop)
Reads the table data from the given xml document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String XML_DS
public static final String XML_DS_COLUMNLABEL
public static final String XML_DS_ROWLABEL
public static final String XML_DS_ROW
public static final String XML_DS_ROW_CELL
protected boolean isDebug
Constructor Detail |
public JCTableXMLParser()
Method Detail |
public void readAndParse(Reader r, com.klg.jclass.util.xml.JCTablePopulator pop) throws IOException, JCParseException
r
- reader open on an active streampop
- JCTablePopulator
instance with which to set table
data
IOException
JCParseException
protected void readTableData(Document xml, com.klg.jclass.util.xml.JCTablePopulator pop) throws IOException
xml
- the xml document to parsepop
- the JCTablePopulator
instance with which to set
the newly parsed data
IOException
protected Object cvtToTableValue(String value)
value
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |