I have this XML:
<movies> <movie> <title>A History of Violence</title> </movie> <movie> <title>Heat</title> </movie> </movies>
And I want to get the first film, but said that bring me the film that was before Heat.
Heat
Good use case preceding:
preceding
//movie/title[. = "Heat"]/preceding::movie
Or preceding-sibling:
preceding-sibling
//movie[title = "Heat"]/preceding-sibling::movie
Source: https://habr.com/ru/post/1623333/More articles:Use the GoogleMap API or MapBox Direction API to implement my own navigation in my application. - androidHow can I get the distance, direction, duration from my current location to the next step? - javaReturns NULL when using a template in C ++ - c ++Skip property-based plugin execution - mavenCamera2 ImageReader freezes re-capture request - androidgrid search with weighted AUC - scikit-learnThe best way to sort a list by reversing the sublist is sortingReading JSON file inside F # using Json.NET - json.netHamcrest assertThat - output type - javaSequelize compound unique constraint - node.jsAll Articles