Hi. I am using the following code to add lines and info into a repeating table:
public void QueueList(string[] tmp_strArrayQueueGr, string[] tmp_strArrayQueueFields, string[,]tmp_strArrayQueueValues, int tmp_intNrRec, int tmp_k)
{
XPathNavigator objRoot = this.MainDataSource.CreateNavigator();
string myNameSpace = "";
myNameSpace = NamespaceManager.LookupNamespace("my");
XmlWriter writer = objRoot.SelectSingleNode(tmp_strArrayQueueGr[0], NamespaceManager).AppendChild();
writer.WriteStartElement(tmp_strArrayQueueGr[1], myNameSpace);
for (int i = 0; i < tmp_intNrRec; i++)
{
writer.WriteElementString(tmp_strArrayQueueFields[i], myNameSpace, tmp_strArrayQueueValues[tmp_k, i]);
writer.WriteEndElement();
}
writer.Close();
}
The problem is that when the program reaches the second value I get an error:
"TOKEN EndElement IN STATE TopLevel WOULD RESULT IN AN INVALID XML DOCUMENT.
Could anyone help me with this? Which instruction should I use to put all the info in the repeating table on the form? the repeating table has 3 columns and each time I add one line when I push a button. Thank you!