title: How to get Image src attribute value using XPath
body: <p>I want to extract the image url from the  tag using XPath but the only problem is it returning whole src attr using the below XPath.</p>
  <p>Query used in Chrome inspect tool:</p>
  <pre><code>$x(&quot;//div[@class='specs-photo-main']//img/@src&quot;)
  </code></pre>
  <p>Output:</p>
  <pre><code>[src]
  0: src
  baseURI: &quot;https://www.gsmarena.com/xiaomi_11i_hypercharge-11186.php&quot;
  childNodes: NodeList []
  firstChild: null
  isConnected: false
  lastChild: null
  localName: &quot;src&quot;
  name: &quot;src&quot;
  namespaceURI: null
  nextSibling: null
  nodeName: &quot;src&quot;
  nodeType: 2
  nodeValue: &quot;https://fdn2.gsmarena.com/vv/bigpic/xiaomi-11i-hypercharge.jpg&quot;
  ownerDocument: document
  ownerElement: img
  parentElement: null
  parentNode: null
  prefix: null
  previousSibling: null
  specified: true
  textContent: &quot;https://fdn2.gsmarena.com/vv/bigpic/xiaomi-11i-hypercharge.jpg&quot;
  value: &quot;https://fdn2.gsmarena.com/vv/bigpic/xiaomi-11i-hypercharge.jpg&quot;
  [[Prototype]]: Attr
  length: 1
  [[Prototype]]: Array(0)
  </code></pre>
  <p>Is there is a way to get the &quot;nodeValue&quot; of &quot;src&quot; attribute?</p>