vineetkeshari / cs373-xml

CS W373 : Software Engineering : Project 2
0 stars 0 forks source link

No ElementTree #18

Closed vineetkeshari closed 11 years ago

vineetkeshari commented 11 years ago

Explore a more compact data structure than ElementTree since the XML elements don't have any data in them.

A simple dict may work as follows: { xml_index : [ label, [child1_index, child2_index,...] ], ... }

vineetkeshari commented 11 years ago

Better: { xml_index : {child_label_1 : xml_label_1, child_label_2 : xml_label_2, ... }, ... }

vineetkeshari commented 11 years ago

Implemented this dictionary. Doesn't help speed up the code since the ElementTree still gets built and then converted. Will need to implement own method to read the XML as well, which seems much more painful.

vineetkeshari commented 11 years ago

Also need to find out if ditching ElementTree altogether will be allowed.

vineetkeshari commented 11 years ago

Tried everything. Custom XML reader, regex matches, an even faster arrangement of dictionaries for O(1) access to pretty much everything.

NOTHING WORKS!