30 #include <xercesc/dom/DOM.hpp>
31 #include <xercesc/sax2/DefaultHandler.hpp>
32 #include <xercesc/sax2/Attributes.hpp>
33 #include <xercesc/sax2/SAX2XMLReader.hpp>
43 using namespace xercesc;
76 std::vector<std::vector<casacore::String>*>*
getData() {
return &
data; }
79 void setPrintDebug(
bool pdb);
96 std::vector<std::vector<casacore::String>*>
data;
99 std::vector<std::vector<TBData*>*>&
data2;
169 bool parseXMLtable(
XMLtoken* t,
bool parsedata);
198 Result parseXML(
const DOMElement* element,
bool parsedata);
202 Result parseTable(
const DOMElement* element,
bool parsedata);
206 Result parseTableData(
const DOMElement* element);
234 void startDocument();
240 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
241 const XMLCh*
const qname,
const Attributes& attrs);
244 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
245 const XMLCh*
const qname);
248 void characters(
const XMLCh*
const chars,
const unsigned int length);
258 std::vector<casacore::String>*
row;
267 std::map<int, std::vector<TBKeyword*>*>
colkws;
bool & insertRow
Is true if this table allows for the insertion of rows, false otherwise.
SAX2XMLReader * reader
SAX reader.
Convenience class for a casacore::String/bool tuple.
std::map< int, std::vector< TBKeyword * > * > colkws
Keep all parsed column keywords.
std::vector< XMLtoken * > xkeywords
All parsed XMLtokens that had a tag name of TBConstants::XML_KEYWORD.
std::vector< casacore::String > * row
The current row of table data being parsed.
Representation of a single XML token.
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
std::vector< TBField * > & fields
Holds the table fields.
std::stringstream extraText
Keeps all non-XML or extra text.
Parameters that define all table data and meta-deta.
bool inTD
Flag indicating whether the parsing is currently in a tag or not.
TBParser subclass that uses a DOM parser in the XERCES library.
bool valid
Indicates whether the parsing is valid or not.
std::vector< int > & subtableRows
Holds the list of the number of rows for each subtable.
LatticeExprNode length(const LatticeExprNode &expr, const LatticeExprNode &axis)
2-argument function to get the length of an axis.
std::map< casacore::String, std::vector< XMLtoken * > * > xcolkeywords
All parsed XMLtokens that had a tag name of TBConstants::XML_COLUMNKW.
int & totalRows
Holds the total number of rows in the table.
bool printdebug
Is true if debug information should be printed, false otherwise.
std::vector< TBKeyword * > & keywords
Holds the table keywords.
std::vector< XMLtoken * > xfields
All parsed XMLtokens that had a tag name of TBConstants::XML_FIELD.
std::vector< std::vector< casacore::String > * > * getData()
std::vector< std::vector< TBData * > * > & data2
Holds the "real" table data.
bool parsedata
Is true if the table data should be parsed, false otherwise.
Parses the XMLDriver-generated XML into data in a TBTable.
int & loadedRows
Holds the number of rows currently loaded in the table.
String: the storage and methods of handling collections of characters.
TBParser subclass that uses a SAX parser in the XERCES library.
std::vector< std::vector< casacore::String > * > data
Holds the table data.
bool & removeRow
Is true if this table allows for the deletion of rows, false otherwise.
TBParser subclass that uses a "home" parsing method.