Dim schemaEl As XmlElement
Dim dataEl As XmlElement Dim node As XmlNode Dim type As XmlNodeType ... ' Extract the schema and data elements from the output schemaEl = Nothing dataEl = Nothing For i = 0 To dynTTEl.ChildNodes.Count - 1 node = dynTTEl.ChildNodes( i ) type = node.NodeType If type = System.Xml.XmlNodeType.Element Then If schemaEl Is Nothing Then schemaEl = node ElseIf dataEl Is Nothing Then dataEl = node Else ‘Too many elements, something is wrong End If End If Next i ' Load schema and data into a System.Data.DataSet, then bind to a ‘ System.Windows.Forms.DataGrid mySchemaReader = New System.Xml.XmlNodeReader(schemaEl) myDataReader = New System.Xml.XmlNodeReader(dataEl) myDataSet.ReadXmlSchema(mySchemaReader) myDataSet.ReadXml(myDataReader) ' Load myDataGrid with the output from DynTT myDataGrid.SetDataBinding(myDataSet, "Item") |