Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using wcf service in that it returns the values in xml format but that doesn't have xml file name that simply shows the result in attributes in that , i am getting this code,
strXmlFromWcf = "<arrayofstring xmlns="\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"" xmlns:i="\"http://www.w3.org/2001/XMLSchema-instance\""><string>1</string><string>2</string><string>3</string></arrayofstring>"  



i need to get those values 1,2,3..for this i am using


if (doc.DocumentElement != null)
           {
               string res = doc.DocumentElement.InnerText;
               txtEmail.Text = res;
           }


but here i am getting the result as 123 i need to get result by single attribute.
i need to access those attributes to store in variables ...
please help me...thank u in adv....
Posted

hve you tried accessing using innerxml?
 
Share this answer
 
Try using

node.getElementsByTagName("tagname");

XML
x=xmlDoc.getElementsByTagName("string");

for (i=0;i<x.length;i++)
  {
  document.write(x[i].childNodes[0].nodeValue);
  document.write("<br />");
  }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900