Smart    Lucky

Smart Lucky

  • NA
  • 555
  • 639.5k

Problem in Getting Xml element value in asp.net

Apr 17 2012 8:41 AM
Hi i am trying to get value of the ement with name ,Name is getting but value is not printing can any one help me plz...?




while (reader.Read())
        {
            if (reader.NodeType == XmlNodeType.Element)
            {
                Response.Write("Elemet is======>" + reader.Name+"Values is =====>"+reader.Value+"<br/>"); // I want to value of the elment here 


               


                if (reader.HasAttributes)
                {
                    for (int i = 0; i < reader.AttributeCount; i++)
                    {
                        Response.Write("Attribute value is=====>" + reader.GetAttribute(i) + "<br/>");
                    }
                }
               
            }

Answers (1)