Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Works for me, when the alue is quotes by double quotes, let's post an example, since it doesn't get clear in the comment.</p> <p>I created a file <code>html.html</code>:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;meta name="description" content="some content"&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;TODO write content&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and then a php:</p> <pre><code>&lt;?php $file = "html.html"; $dom = new DOMDocument(); $dom-&gt;loadHTMLFile($file); $xpath = new DOMXPath($dom); $name = 'description'; $query = '/html/head/meta[@name="'.$name.'"]/@content'; $contents = $xpath-&gt;query($query); echo $contents-&gt;item(0)-&gt;value; ?&gt; </code></pre> <p>And the output is <code>some content</code></p> <p>You need to close the single quotes after the first double ones, so they will be kept in the quoted string, then to put the variable, start quoting and put double quotes again</p> <p>EDIT:</p> <p>I have used your HTML from the posted site:</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;style type="text/css" media="screen"&gt; &lt;!-- #qm0 {position:relative;} #qm0 a {display:block; white-space:nowrap; } #qm0 div a {float:none;} #qm0 div {visibility:hidden;position:absolute;} #qm0 a {float: left; } --&gt; &lt;/style&gt; &lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8"&gt; &lt;title&gt;Product1 Name&lt;/title&gt; &lt;link href="n-defaultStyle.css" rel="stylesheet" type="text/css"&gt; &lt;meta http-equiv="pragma" content="no-cache"&gt; &lt;meta name="keywords" content=" Ilmfpnv, VrbfZgj, Fsikeprr Mluw"&gt; &lt;meta name="description" content="Beu Urb Hcsmihnurb cl c avlqclb ZtatcZq nrbc in unidrdpt cft mbvfp kj rmi isspulu. Uqwoiab in sf upq lkspuj jZ oed diirovs"&gt; &lt;/head&gt; </code></pre> <p>And still have no problems, output:</p> <p><code>Beu Urb Hcsmihnurb cl c avlqclb ZtatcZq nrbc in unidrdpt cft mbvfp kj rmi isspulu. Uqwoiab in sf upq lkspuj jZ oed diirovs</code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload