I have an xml string looking something like this
<row Name="analog.__VG_SPP3_SFRTPCT" />
<row Name="analog._3305_LIST210_1" />
<row Name="analog._AG_5340_PR14AN" />
<row Name="analog._AG_EPNT_2" />
<row Name="analog._AG_EPNT_SP" />
<row Name="analog._AG_MERC_ERXTES" />
<row Name="analog._AG_ROC_TEST" />
<row Name="analog._AG_ROM1_LOAD" />
<row Name="analog._AG_TEST_CRC1LT" />
<row Name="analog._AG_TEST_CRC1RT" />
<row Name="analog._CWAV_TST_MDP1CV" />
<row Name="analog._CWAV_TST_MDP1CV_LIST" />
Trying to generate an option list for a combo box displayed in javascript, I am trying to loop through the xml string in razor to generate it, however I am not quite sure how to or if its even possible, I can do this by splitting the xml into a separate data structure and then looping through that datastructure again in razor. However for performance reasons it would be nice to be able to do this in one go.
@model string
@{
Response.ContentType = "text/xml";
Layout = null;
}
<complete>
<option value=""><![CDATA[ ]]></option>
@foreach (var row in @Model)
{
<option value="@(row.Name)">@(row.Name)</option>
}
</complete>