Hello all.. I have an XML document, created the XML Schema (XSD), then added some Keys and a relation to the schema.. When I open up the XML file, the relation is not there. It seems like its not reading the schema file.. here is my code:

VB Code:
  1. Public Sub LoadFromXML(ByVal strXMLFile As String)
  2.  
  3.         Dim nodElement As New TreeNode()   'Create a Generic Element Node
  4.         Dim nodParent As New TreeNode()    'Create a Generic Parent Node
  5.  
  6.         ' Create and Open DataSet from XML
  7.         Dim dsXMLNames As New DataSet("DotNetSend")
  8.         dsXMLNames.ReadXml(strXMLFile)
  9.  
  10.         With dsXMLNames.Tables("Groups")
  11.  
  12.             Dim r As DataRow                                    'Create Generic DataRow
  13.  
  14.             'Loop through all Rows in Group table
  15.             For Each r In .Rows
  16.                 nodParent = New TreeNode()
  17.                 nodParent.Text = r("Name").ToString()
  18.                 'nodParent.Expand()
  19.  
  20.                 Dim c As DataRow                                'Create Generic DataRow
  21.  
  22.                 'Loop through all child rows of parent
  23.                 For Each c In r.GetChildRows("GroupsUsers")
  24.                     nodElement = New TreeNode()
  25.  
  26.                     'Set Node Properties
  27.                     With nodElement
  28.                         .Checked = c("Selected").ToString()
  29.                         .Tag = c("Name").ToString()
  30.                         .Text = c("Description").ToString()
  31.                     End With
  32.  
  33.                     'Add Child node to Parent
  34.                     nodParent.Nodes.Add(nodElement)
  35.                     nodElement = Nothing
  36.                 Next c
  37.  
  38.                 'Add Parent to Treeview
  39.                 tvUsers.Nodes.Add(nodParent)
  40.                 nodParent = Nothing
  41.             Next r
  42.  
  43.         End With
  44.  
  45.     End Sub

How am I supposed to link the xml file to the schema? Also, can I put the schema inline inside the .xml file? Lastly, why doesnt this work!?!?!

-mcd