PDA

View Full Version : XML Child length problem?



palanivelrajan
March 19th, 2010, 02:33 AM
This following data is my xmldata. I have to find out child length is equal to 3.



<studentlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<namelist>
<Name>Rithick rajan</Name>
<Age>21</Age>
<Sex>Male</Sex>
<Address>5/15, Vinayagar Kovil Street, Chennai.</Address>
</namelist>
<namelist>
<Name>Kumar</Name>
<Age>19</Age>
<Sex>Male</Sex>
<Address>Newno: 45, Kamaraj street, Chennai.</Address>
</namelist>
<namelist>
<Name>Ravimumar</Name>
<Age>12</Age>
<Sex>Male</Sex>
<Address>378A, Grass Land Street, Pune.</Address>
</namelist>
</studentlist>
please help me tom solve this problem. I used child(0).length it was not working...

creatify
March 20th, 2010, 06:40 PM
in XML the length property is a function and is followed by parenthesis, see this link:

length() (http://help.adobe.com/en_US/AS3LCR/Flash_10.0/XML.html#length())

palanivelrajan
March 22nd, 2010, 01:50 AM
thanks