Torna al Thread
Private Function LeggiCampi(ByVal filepath As String)
'Apro l'xsd
Dim doc As New System.Xml.XmlDocument()
doc.Load(filepath)
'Il nodo contenente gli elementi
Dim nodoroot As System.Xml.XmlNode = Nothing
'Cerco il nodo all'interno dell'xsd
Dim nodo As String = "nodo"
For Each node As System.Xml.XmlNode In doc.LastChild.ChildNodes
If node.Attributes("name").Value <> "dataroot" Then nodo = node.Attributes("name").Value
If node.Attributes("name").Value = nodo Then
nodoroot = node
Exit For
End If
Next
Dim results As New List(Of String)
'Qui vengono immagazzinati i nomi degli elements
'Questa funzione legge ricorsivamente tutti
'gli elements di un nodo (in questo caso query_intervento
ReadAllXsdElements(nodoroot, results)
'ora results contiene tutti i nomi degli elements
Return (results)
End Function