Page 1 of 1

XPATH expression

Posted: Sun Jan 07, 2018 6:53 am
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.
===============================================================================================================

Re: XPATH expression

Posted: Mon Jan 08, 2018 9:05 am
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