title: How to get list of elements from XSOM parser
body: <p>With XSOM, how can I obtain information for elements from a sample schema? (see below)</p>
  
  <p>I've been trying to use the iterateElementDecls() method but only can obtain the top element (note).</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.w3schools.com"
  xmlns="http://www.w3schools.com"
  elementFormDefault="qualified"&gt;
  
  &lt;xs:element name="note"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="to" type="xs:string"/&gt;
        &lt;xs:element name="from" type="xs:string"/&gt;
        &lt;xs:element name="heading" type="xs:string"/&gt;
        &lt;xs:element name="body" type="xs:string"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
  </code></pre>