i want to get the child nodes of suras in the following xml data;
<suras alias="chapters">
<sura index="1" ayas="7" start="0" name="الفاتحة" tname="Al-Faatiha" ename="The Opening" type="Meccan" order="5" rukus="1" />
<sura index="2" ayas="286" start="7" name="البقرة" tname="Al-Baqara" ename="The Cow" type="Medinan" order="87" rukus="40" />
<sura index="3" ayas="200" start="293" name="آل عمران" tname="Aal-i-Imraan" ename="The Family of Imraan" type="Medinan" order="89" rukus="20" />
<sura index="4" ayas="176" start="493" name="النساء" tname="An-Nisaa" ename="The Women" type="Medinan" order="92" rukus="24" />
<sura index="5" ayas="120" start="669" name="المائدة" tname="Al-Maaida" ename="The Table" type="Medinan" order="112" rukus="16" />
</suras>
The suras node is comming fine but when i try to access the sura
node, i can't get it as an Elements
of suras
;
as you can see if i debug the parent i.e suras node, i can clearly see the first and last node correctly. But when i try to query its Elements or Decendents, i dont' get anything. Check the following screen shot;
Similarly, if i change my code to
Element("sura")
instead of Elements("sura")
, then it only shows first node check this;
So, my question is, Why i am not getting the child nodes i.e surah?