Patent ID: 7657549
Filing Date: 2010-02-02
Classification: G06F,Y10S

Abstract:
1. A method of converting data stored in an XML file to a table having rows and columns, the data within the XML file having a plurality of elements, each element having an XPath, the method comprising: (a) detecting a tabular structure for the table; (b) obtaining, from a user via a software wizard, an element selected by the user for addition into the tabular structure; (c) determining row-terminating conditions using the tabular structure of the XML file-and a plurality of column data sources, the column data sources stored in a column data source table, the determining further comprising: (c.1) for each of the elements, determining a number of occurrences of the element in the XML file, a number of occurrences of the element containing data, and a maximum number of occurrences of the element under a parent of the element; (c.2) for each of the elements, if the element contains data, adding the element to a structure description; (c.3) for each element in the structure description, if the element contains data and is a first element under the parent of the element, adding the element to a table like structure list; and (c.4) determining a rule node by: (i) for each column data source in the column data source table, determining if a parent of a selected node linked to the column data source is NULL, and if the parent is NULL, selecting instead a following node; (ii) unmarking the selected node; and (iii) if the parent of the selected node is unmarked, then marking the parent and replacing the selected node with the parent in the column data source table; and if the parent is marked, removing a link between the selected node and the column data source; (d) determining a numerical scope for each of the elements in the XML file; (e) testing one of the elements in the XML file to determine if the tested element matches one of the column data sources, and if the tested element matches one of the column data sources: (i) storing the element in a table cache; (ii) updating the columns, including items of a lesser scope within the table cache, that are within the scope of the tested element; (iii) storing the tested element in a prototype row; and (iv) when exiting the tested element, passing a depth associated with the tested element to the table cache; (f) determining if the tested element matches one of the row-terminating conditions from a row-terminating rule base, and if the tested element matches a row-terminating condition, and the tested element is in the prototype row, then writing the prototype row to the table cache; (g) determining if the scope of one of the column data source matches the tested element, and if so, erasing a column in the prototype row corresponding to the tested element; (h) repeating steps (e) through (g) until each element of the XML file has been tested; (i) copying the prototype row to the table cache; and (j) outputting the table cache as the table, wherein a column of the table has at least two of the data sources from the plurality of data sources.