Jump to content

Xpath query


pbac83
 Share

Recommended Posts

Hello,

I've the following example xml structure:

 

<news>
<new>
<newid>3443</newid>
<title>Title1</title>
<body>Body1 hello everyone</body>
<url>/news/tech-3443</url>
</new>
<new>
<newid>3753</newid>
<title>Title2</title>
<body>Body2 hello everyone</body>
<url>/news/social-3753</url>
</new>
<new>
<newid>3113</newid>
<title>Title3</title>
<body>Body3 hello everyone</body>
<url>/news/tech-3113</url>
</new>
</news>
How can write a Xpath query to fetch only nodes with the prefix "/news/tech-" in the "url" field?
Many thanks!
Piero
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...