1. A method for navigation of a data structure ( 101 ), comprising: receiving an input path expression ( 104 ) for a query of a data structure ( 101 ) to locate one or more elements ( 110 ) in the data structure ( 101 ) at runtime, the input path expression ( 104 ) including one or more path steps; accessing a schema ( 103 ) of the data structure ( 101 ) and obtaining information relating to the one or more elements ( 110 ); modifying the input path expression ( 104 ) to specify an index in one or more of the path steps to limit the number of occurrences of an element located in a path step; and using the modified path expression to query ( 111 ) the data structure ( 101 ) at runtime.