title: How to read an Array of Element Names from XMLSchema XML File in PHP?
body: <p>I wanted to get the list of schema elements from xml. For example</p>
  
  <pre><code>&lt;xs:schema id="SPPOnlineXML" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&gt;
   &lt;xs:element name="SPPOnlineXML" msdata:IsDataSet="true" msdata:MainDataTable="lev_settings" msdata:UseCurrentLocale="true"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:element name="lev_settings"&gt;
          &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
              &lt;xs:element name="LEVID" type="xs:int" minOccurs="0" /&gt;
              &lt;xs:element name="ATTHEADID" type="xs:int" minOccurs="0" /&gt;
              &lt;xs:element name="MINDATETYPE" type="xs:unsignedByte" minOccurs="0" /&gt;
              &lt;xs:element name="MINMONTH" type="xs:unsignedByte" minOccurs="0" /&gt;
            &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
      &lt;/xs:choice&gt;
    &lt;/xs:complexType&gt;
   &lt;/xs:element&gt;
  &lt;/xs:schema&gt; 
  </code></pre>
  
  <p>from the above schema i wanted to create an array of elements "LEVID","ATTHEAD","MINDATETYPE","MINMONTH"</p>