0 Replies Latest reply on Oct 11, 2006 12:21 PM by Newsgroup_User

    nodeValue problem

    Level 7
      This is a multi-part message in MIME format.

      ------=_NextPart_000_0028_01C6ED83.8AB82360
      Content-Type: text/plain;
      charset="iso-8859-9"
      Content-Transfer-Encoding: quoted-printable

      hi,

      i take a value from XML like this :
      var num:Number=3D Number(votes.childNodes =
      .childNodes[1].firstChild.nodeValue

      in XML value is(xml file is below) : 21,22

      but, num variable is become NaN?? if I dont use Number, there is no =
      problem, i took 21,22, but when I multiple it with a number or Convert =
      it to Number(like above) result is NaN?

      why?
      <?xml version=3D'1.0' encoding=3D'UTF-8'?>

      <results>

      <vote>

      <id>1</id>

      <name>text</name>

      <count>10</count>

      <percentage>21,22</percentage>

      </vote>

      </results>



      regards,

      Burak

      ------=_NextPart_000_0028_01C6ED83.8AB82360
      Content-Type: text/html;
      charset="iso-8859-9"
      Content-Transfer-Encoding: quoted-printable

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML><HEAD>
      <META http-equiv=3DContent-Type content=3D"text/html; =
      charset=3Diso-8859-9">
      <META content=3D"MSHTML 6.00.5346.5" name=3DGENERATOR>
      <STYLE></STYLE>
      </HEAD>
      <BODY>
      <DIV><FONT face=3DArial size=3D2>hi,</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2>i take a value from XML like this =
      :</FONT></DIV>
      <DIV><FONT face=3D"Courier New" color=3D#800000 size=3D2>var =
      num:Number=3D=20
      Number(votes.childNodes=20
      .childNodes[1].firstChild.<STRONG>nodeValue</STRONG></FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2>in XML value is(xml file is below) :=20
      21,22</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2>but, num variable is become NaN??  =
      if I dont=20
      use <FONT color=3D#800000>Number, </FONT><FONT color=3D#000000> =
      there is no=20
      problem, i took 21,22, but when I multiple it with a number or Convert =
      it to=20
      Number(like above) result is NaN?</FONT></FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2>why?</FONT></DIV>
      <DIV>
      <P><FONT face=3DArial color=3D#808080 size=3D2>&lt;?xml version=3D'1.0'=20
      encoding=3D'UTF-8'?&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#808080 =
      size=3D2>&lt;results&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#808080 size=3D2>&lt;vote&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#808080 =
      size=3D2>&lt;id&gt;1&lt;/id&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#808080=20
      size=3D2>&lt;name&gt;text&lt;/name&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#808080=20
      size=3D2>&lt;count&gt;10&lt;/count&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#ff0000=20
      size=3D2>&lt;percentage&gt;21,22&lt;/percentage&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#808080 size=3D2>&lt;/vote&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#808080 =
      size=3D2>&lt;/results&gt;</FONT></P>
      <P><FONT face=3DArial color=3D#808080 size=3D2></FONT> </P>
      <P><FONT face=3DArial color=3D#808080 size=3D2>regards,</FONT></P>
      <P><FONT face=3DArial color=3D#808080 =
      size=3D2>Burak</FONT></P></DIV></BODY></HTML>

      ------=_NextPart_000_0028_01C6ED83.8AB82360--