CodeMirror XML Mode: Read all attributes
<p>is there a way in CodeMirror running in XML mode to read all attributes of a tag at cursor position?</p>

<p>The token at the cursor can be determined via </p>

<p><code>var cur = cm.getCursor(),
    token = cm.getTokenAt(cur);
</code></p>

<p>Example:
The statement "<code>&lt;mytag id="1" name="Test"/&gt;</code>" could result in this:</p>

<p><code>{
  id: "1",
  name: "Test"
}</code></p>

<p>Thanks for any advices.</p>