1. A computer-implemented method comprising the steps of: encoding an XML data source, thereby forming an encoded XML data source, wherein the XML data source comprises a textual representation of an element; wherein the encoded XML data source comprises an encoded representation of the element; receiving an XPath expression to be performed on the XML data source, wherein the XPath expression comprises a textual reference to the element; compiling the XPath expression, thereby forming a compiled XPath expression, wherein the step of compiling comprises translating the textual reference into an encoded reference; wherein the encoded reference is identical to the encoded representation; and evaluating the compiled XPath expression on the encoded XML data source without decoding the encoded XML data source; generating a result based on the evaluation.