title: xpath to capture form action attribute in php
body: <p>I have the following form tag in my html source </p>
  
  <pre><code>&lt;form class="webform-submission-form webform-submission-add-form webform-submission-footer-subscription-form webform-submission-footer-subscription-add-form webform-submission-footer-subscription-node-7-form webform-submission-footer-subscription-node-7-add-form js-webform-details-toggle webform-details-toggle" data-drupal-selector="webform-submission-footer-subscription-node-7-add-form" action="/en/" method="post" id="webform-submission-footer-subscription-node-7-add-form" accept-charset="UTF-8"&gt;
  </code></pre>
  
  <p>and I would like to capture the <code>action</code> value with xpath</p>
  
  <p>this is what I've tried</p>
  
  <pre><code>$xpath = new DOMXpath($dom);
  $link = $xpath-&gt;query('//form/a');
  $link-&gt;getAttribute('action');
  </code></pre>
  
  <p>getting nothing in return.</p>