I have got below xml format with me and I am using .NET 2.0.
<?xml version="1.0" encoding="utf-8"?>
<publicationsList>
<publication tcmid="tcm:0-226-1">
<name>00 Primary Parent</name>
</publication>
<publication tcmid="tcm:0-227-1">
<name>01 Group Parent</name>
</publication>
<publication tcmid="tcm:0-228-1">
<name>02 Developer Library</name>
</publication>
<publication tcmid="tcm:0-229-1">
<name>03C Content Library</name>
</publication>
</publicationsList>
Now I want to populate my dropdownlist from the above XML, my dropdownlist TEXT will be “name” node value and dropdownlist VALUE will be “tcmid” attribute value using a method in C#.
Please suggest!!
You could do something like this
Using Linq
Update:
Using XmlDocument