1. A method for encoding semi-structured data, comprising: a) Providing a semi-structured data input; b) obtaining an encoded semi-structured data by selectively encoding at least part of said semi-structured data into strings of arbitary length in a way that (i) maintains non-structural and structural information associated with the semi-structured data, and (ii) the so encoded semi-structured data can be indexed for efficient access.