How to get a node which is before other?

Sergio M.

I have this XML:

<movies>
<movie>
    <title>A History of Violence</title>
</movie>
<movie>
    <title>Heat</title>     
</movie>
</movies>

And I want to get first movie but saying that bring me the movie that is before Heat.

alecxe

A good use case for preceding:

//movie/title[. = "Heat"]/preceding::movie

Or, preceding-sibling:

//movie[title = "Heat"]/preceding-sibling::movie

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

how to get updated props in other components which are in other routes?

分類Dev

How to get the text of a node before its first child node by xpath?

分類Dev

How to get result from function in other file in node.js

分類Dev

Anylogic: Lift trucks get stuck before a node

分類Dev

Get the element (node) which triggered an event

分類Dev

how get page before? Xamarin

分類Dev

How can I get `highlight.xPx` & `highlight.yPx` of the other lines which have same x point in iOS-Chart?

分類Dev

How to get which element was clicked?

分類Dev

How to resize image in node js before writeFile

分類Dev

How to detect if one node is pointing to the other in spritekit

分類Dev

Is there a process which doesn't send EOF before terminating and how to create it?

分類Dev

Systemd: how to create a script that runs before any other

分類Dev

How to abstract code which calls various other code

分類Dev

Meteor/Iron router: how to wait on data which depends on other data

分類Dev

How to get parent node in angular

分類Dev

how to get random element of array which is not null?

分類Dev

How to get which day of week is a specific date?

分類Dev

How does Ruby(or other languages) Implicitly know which object belongs to which built in class?

分類Dev

How to get image on other table while editing on other page

分類Dev

How to get other column with onItemClickListener in ListView

分類Dev

How to get the other application data in android

分類Dev

How get access token from other users

分類Dev

How can I determine which alternative node was chosen in ANTLR

分類Dev

winston - how to log errors which cause node process to crash?

分類Dev

How does Zookeeper manage node roles in other clusters?

分類Dev

In which directory is node running?

分類Dev

Binary Search Tree Node Removal: How to decide which subtree to traverse for removal? (If node has two children)

分類Dev

How can I tell the version of a package which will be installed before I install it?

分類Dev

How to do HTTPS GET with client certificate in node

Related 関連記事

  1. 1

    how to get updated props in other components which are in other routes?

  2. 2

    How to get the text of a node before its first child node by xpath?

  3. 3

    How to get result from function in other file in node.js

  4. 4

    Anylogic: Lift trucks get stuck before a node

  5. 5

    Get the element (node) which triggered an event

  6. 6

    how get page before? Xamarin

  7. 7

    How can I get `highlight.xPx` & `highlight.yPx` of the other lines which have same x point in iOS-Chart?

  8. 8

    How to get which element was clicked?

  9. 9

    How to resize image in node js before writeFile

  10. 10

    How to detect if one node is pointing to the other in spritekit

  11. 11

    Is there a process which doesn't send EOF before terminating and how to create it?

  12. 12

    Systemd: how to create a script that runs before any other

  13. 13

    How to abstract code which calls various other code

  14. 14

    Meteor/Iron router: how to wait on data which depends on other data

  15. 15

    How to get parent node in angular

  16. 16

    how to get random element of array which is not null?

  17. 17

    How to get which day of week is a specific date?

  18. 18

    How does Ruby(or other languages) Implicitly know which object belongs to which built in class?

  19. 19

    How to get image on other table while editing on other page

  20. 20

    How to get other column with onItemClickListener in ListView

  21. 21

    How to get the other application data in android

  22. 22

    How get access token from other users

  23. 23

    How can I determine which alternative node was chosen in ANTLR

  24. 24

    winston - how to log errors which cause node process to crash?

  25. 25

    How does Zookeeper manage node roles in other clusters?

  26. 26

    In which directory is node running?

  27. 27

    Binary Search Tree Node Removal: How to decide which subtree to traverse for removal? (If node has two children)

  28. 28

    How can I tell the version of a package which will be installed before I install it?

  29. 29

    How to do HTTPS GET with client certificate in node

ホットタグ

アーカイブ