XPATH expression

Questions about XML that are not covered by the other forums should go here.
kasettado
Posts: 1
Joined: Sun Jan 07, 2018 6:43 am

XPATH expression

Post by kasettado »

Hello

how can i make this xpath expretions: ==================================================================

1. Get the total number of products for sale in the store;

2. Obtain the list of products sold by a given seller (given he's username);

3. Obtain the total number of products sold by a given vendor (given he's username);

4. Get the last product sold by a given seller (given he's username);

5. Get the total number of comments that a given product has (given its identifier);

6. Get all comments made by a given user (username);

7. List the last 3 comments, first level, of the product (s) with a certain name (ex: "Apple IPhone 8");

8. Obtain the names of users who have commented, at any depth level, on a particular product, based on its (product) identifier.
===============================================================================================================
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: XPATH expression

Post by Radu »

Hi,

The way in which the xpath expressions would look like would depend on how the queried XML document structure looks like.
Maybe you should start reading some XPath tutorials:

https://www.w3schools.com/xml/xpath_intro.asp

and using Oxygen's XPath toolbar to test various small expressions on your XML instances.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply