Table Parser for WET 3.0 - nschonni/wet-boew GitHub Wiki
Project Lead: Pierre Dubois (@duboisp) - Industry Canada, Canadian Intellectual Property Office
Create a plugin that use a table
- Load the dependency "parserTable"
- call the parser with your jQuery table element
if (!$(elem).data().tblparser) {
_pe.fn.parsertable.parse($(elem));
}
That is simple, once the table are fully parsed, each tabular element get a new jQuery.Data attribute called "tblparser". You can access it like this
tblparser = $(elem).data().tblparser;
the "tblparser" object would depend of the "elem". You can use the API Interface to know the relationship and get the attribute available.
If you want, you can access it directly from the Firebox console, something like this
console.log($('table:eq(0)').data().tblparser);
On my Table Usability Concept github project you will find the full API listed here https://github.com/duboisp/Table-Usability-Concept/tree/master/API You will need to use the API under "Table Parser - WET 3.0 release" header.
If you have any question regarding the API or about the Table Usability Concept, don't hesitate to submit an issue (https://github.com/duboisp/Table-Usability-Concept/issues/new)
If you are looking about how to get access to the parsed tabular data take a look at
HTML Table Validator
- From Line 377 - https://github.com/wet-boew/wet-boew/blob/master/demos/tableparser/validator-htmltable.html#L377
- To Line 686 - https://github.com/wet-boew/wet-boew/blob/master/demos/tableparser/validator-htmltable.html#L686
- From Line 31 - https://github.com/wet-boew/wet-boew/blob/master/src/js/workers/zebra.js#L31
- To Line 190 - https://github.com/wet-boew/wet-boew/blob/master/src/js/workers/zebra.js#L190
- From Line 2384 - https://github.com/wet-boew/wet-boew/blob/master/src/js/dependencies/charts.js#L2384
- To Line 2424 - https://github.com/wet-boew/wet-boew/blob/master/src/js/dependencies/charts.js#L2424