Hello,
I'm new to xml and I have a question:
I try to do the following
Dim doc As New XmlDocument
doc.LoadXml("<Request><Root><Requestor name='' /><FlowData flowstatus=''
/><Products><productdate productid='' /></Products></Root></Request>")
Dim node As XmlNode =
doc.SelectSingleNode("Request/Root/Requestor/@name")
node.Value = "TestValue"
Dim node3 As XmlNode =
doc.SelectSingleNode("Request/Root/FlowData/@flowstatus")
node3.Value = "TestStatus"
'here comes something I don't know how to do, I want to fill in multiple
products
Dim i As Integer = 1
Dim node2 As XmlNode
For i = 1 To 3
node2 =
doc.SelectSingleNode("Request/Root/Products/productdate/@productid")
node2.Value = i
i = i + 1
Next i
Finally I take the innerxml to do further operations.
The problem is that the value for node2 always get overwritten. I want a
loop that fills x number of products.
Any suggestions ?
Regards,