How to extract Element value using JavaScript from DOM if i know the XPATH?
===

I have 2 Xpaths from a DOM :

    id("viewproduct-emagoo")/div[@class="big-box"]/div[@class="container-top mb10"]/div[@class="left-content"]/div[@class="container-detalii-produs"]/h2[1]

and

    id("viewproduct-emagoo")/div[@class="big-box"]/div[@class="container-top mb10"]/div[@class="left-content"]/div[@class="container-detalii-produs"]/form[1]/div[1]/div[@class="info-box-produs"]/div[@class="disponibilitate-produs"]/div[@class="pret-produs"]/span[1]

I want to extract the Element/s value from one of the above xpaths using JAVASCRIPT.

If someone can find an old article about this, pls give me the link.