P
pat
Given:
Dim r As String = WS.getInfo("arg1", "arg2", "arg3")
Dim dsTest As New DataSet
Dim srTest As New System.IO.StringReader(r)
dsTest.ReadXml(srTest)
This is how I currently populate a DataSet. The web service "WS"
returns a single string, within which is an XML document. It works
great.
There is a problem, though, in that the XML has missing elements
sometimes. On the server, when a database column is NULL, the server
simply doesn't send it. This is causing my VB.NET app to halt
(apprently waiting for the element tags that won't be arriving)
indefinitely. This happens whether schema is infered or
pre-determined-as one would expect.
So what is needed is 2-fold:
1. Determine if there is a missing element, and ..
2. Insert an empty element in its place (<thing></thing>).
Considering I'm loading the XML as a string, what is the best approach
for this?
TIA!
pat

Dim r As String = WS.getInfo("arg1", "arg2", "arg3")
Dim dsTest As New DataSet
Dim srTest As New System.IO.StringReader(r)
dsTest.ReadXml(srTest)
This is how I currently populate a DataSet. The web service "WS"
returns a single string, within which is an XML document. It works
great.
There is a problem, though, in that the XML has missing elements
sometimes. On the server, when a database column is NULL, the server
simply doesn't send it. This is causing my VB.NET app to halt
(apprently waiting for the element tags that won't be arriving)
indefinitely. This happens whether schema is infered or
pre-determined-as one would expect.
So what is needed is 2-fold:
1. Determine if there is a missing element, and ..
2. Insert an empty element in its place (<thing></thing>).
Considering I'm loading the XML as a string, what is the best approach
for this?
TIA!
pat
