title: parsing meta name/content using xml and r
body: <p>Regarding the answer to: <a href="https://stackoverflow.com/questions/22342501/how-to-get-information-within-meta-name-tag-in-html-using-htmlparse-and-xpa">how to get information within &lt;meta name...&gt; tag in html using htmlParse and xpathSApply</a></p>
  
  <p>My issue:</p>
  
  <pre><code>html &lt;- htmlParse(domain, useInternalNodes=T);
  names &lt;- html['//meta/@name']
  content &lt;- html['//meta/@content']
  
  cbind(names, content)
  </code></pre>
  
  <p>The  meta tags in the page are:</p>
  
  <pre><code>&lt;meta name="description" content="blah, blah...." /&gt;
  &lt;meta name="keywords" content="keyword1, keyword2" /&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  &lt;meta name="google-site-verfication" content="1234jalsdkfjasdf928374-293423" /&gt;
  </code></pre>
  
  <p>What I find is this:</p>
  
  <pre><code> length(names)
  [1] 3
  
  length(content)
  [1] 4
  
  names                                     content
  [1, ] "description"                       [1, ] "blah, blah...."
  [2, ] "keywords"                          [2, ] "keyword1, keyword2"
  [3, ] "google-site-verification"          [3, ] "text/html; charset=UTF-8"
  [4, ] "description"                       [4, ] "1234jalsdkfjasdf928374-293423"
  </code></pre>
  
  <p>Seems like the parser is tripping up on "http-equiv" and returning the <em>next</em> line of code "google-site-verification" but still returning the "content" for the "http-equiv", and then since there are no more "names" cbind is wrapping around to "description" again to match the last line of content which is the actual "google-site-verification".
  Seems like a simple fix, by so far any conditional I do does not work, how can I make this right?</p>