title: Save checkboxlist values to xml using vb.net
body: <p>I have some checkboxlist like this:</p>
  
  <pre><code>    &lt;asp:CheckBoxList ID="G1" runat="server"&gt;
                          &lt;asp:ListItem Value="Comunicações Unificadas" Text="Comunicações Unificadas - UCoIP"&gt;&lt;/asp:ListItem&gt;
                          &lt;asp:ListItem Value="Gestão Documental" Text="Gestão Documental - iPortalDoc"&gt;&lt;/asp:ListItem&gt;
                          &lt;asp:ListItem Value="Gestão Conteúdos Web" Text="Gestão de Conteúdos Web"&gt;&lt;/asp:ListItem&gt;
                          &lt;asp:ListItem Value="Promoção Websites" Text="Promoção de Websites"&gt;&lt;/asp:ListItem&gt;
                          &lt;asp:ListItem Value="Serviços de Consultoria" Text="Serviços de Consultoria"&gt;&lt;/asp:ListItem&gt;
  &lt;/asp:CheckBoxList&gt;
  </code></pre>
  
  <p>When submitting the form than contains them, i want to save all the selected values in a xml file.</p>
  
  <p>At the moment if i select more than one value to submit, in the xml file i only get the first selected, the others do not appear in the file.</p>
  
  <p>I'm saving the values in the xml file this way:</p>
  
  <p>Dim doc As New XmlDocument()
          doc.Load(LocalizacaoFicheiro)</p>
  
  <pre><code>    Dim visitor As XmlElement = doc.CreateElement("Cliente")
  
      Dim res1 As XmlElement = doc.CreateElement("Resposta1")
      res1.InnerText = G1.SelectedValue.ToString
  
  
      visitor.AppendChild(res1)
  
      doc.DocumentElement.AppendChild(visitor)
  
      doc.Save(LocalizacaoFicheiro)
  </code></pre>
  
  <p>I need to change something in the way that i save the data to xml, right?</p>