Design By SLS
New Member
I have a function where I want to add multiple 'values' to a node. Here is function:\[code\] private void GetCategory(DataRow reader, XmlElement myNode) { foreach (DataRow categoryRow in reader.GetChildRows("Category")) { myNode.LastChild.InnerText = categoryRow["CATEGORY_NAME"].ToString(); } }\[/code\]myNode.OuterXml looks like this:\[code\]<field itemid="{2C16342E-7662-432B-9895-5EDB15914D7F}" language="en" version="1" fieldid="{1F5956D6-EABE-4F74-A248-B25B7EE90350}" name="Categories" title=""type="Multilist" source="/sitecore/content/data/Categories" section="Content" tooltip=""><value>US</value></field>\[/code\]I wanted to look something like this:\[code\]<field itemid="{2C16342E-7662-432B-9895-5EDB15914D7F}" language="en" version="1" fieldid="{1F5956D6-EABE-4F74-A248-B25B7EE90350}" name="Categories" title=""type="Multilist" source="/sitecore/content/data/Categories" section="Content" tooltip=""><value>US</value><value>China</value><value>India</value></field>\[/code\]