immtrac
asked on
XML data into comma seperated string
I call a web service and get following XML (see code).
I need to know how do I convert the data into:
7369, 8834
In other words, If I get results, I need to convert result into comma separated string so that I can pass it to query string in URL
I need to know how do I convert the data into:
7369, 8834
In other words, If I get results, I need to convert result into comma separated string so that I can pass it to query string in URL
- <NewDataSet>
- <Table>
<ext_user_id>7369</ext_user_id>
</Table>
- <Table>
<ext_user_id>8834</ext_user_id>
</Table>
</NewDataSet>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I was only hardcoding the xml for demonstration purposes, all you need to do is put the string returned by the webservice into it. This method will work for 10 or 100 nodes in an xml string.
Why would you want to use split, the XmlDocument class is there for a reason, lol
Why would you want to use split, the XmlDocument class is there for a reason, lol
ASKER
What I am getting is 8834,8834
While is should be 7369,8834.
While is should be 7369,8834.
ASKER
Never mind. I got it.
Thanks for ur help
Thanks for ur help
ASKER
So I can not hard code the XML.
Also is there way that we can use split() function?