new to XML and having trouble adding in new nodes to an existing XML file.

Here's how the XML file looks:

```
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Users>
  <UserName-1>
    <Private-1>
      <PrivateFtpAccountId-1>11111</PrivateFtpAccountId-1>
      <PrivatePassword-1>test1</PrivatePassword-1>
    </Private-1>
    <Public-1>
      <PublicFtpAccountId-1>22222</PublicFtpAccountId-1>
      <PublicPassword-1>test2</PublicPassword-1>
    </Public-1>
  </UserName-1>
  <UserName-2>
    <Private-2>
      <PrivateFtpAccountId-2>33333</PrivateFtpAccountId-2>
      <PrivatePassword-2>test3</PrivatePassword-2>
    </Private-2>
    <Public-2>
      <PublicFtpAccountId-2>44444</PublicFtpAccountId-2>
      <PublicPassword-2>test4</PublicPassword-2>
    </Public-2>
  </UserName-2>
</Users>

```

I want to add in these following the last grouping.

```
<UserName-3>
    <Private-3>
      <PrivateFtpAccountId-3>55555</PrivateFtpAccountId-3>
      <PrivatePassword-3>test5</PrivatePassword-3>
    </Private-3>
    <Public-3>
      <PublicFtpAccountId-3>66666</PublicFtpAccountId-3>
      <PublicPassword-3>test6</PublicPassword-3>
    </Public-3>
</UserName-3>

```

After running my code below I produce this XML file (I'm replacing the original):

```
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Users>
  <UserName-1>
    <Private-1>
      <PrivateFtpAccountId-1>11111</PrivateFtpAccountId-1>
      <PrivatePassword-1>test1</PrivatePassword-1>
    </Private-1>
    <Public-1>
      <PublicFtpAccountId-1>22222</PublicFtpAccountId-1>
      <PublicPassword-1>test2</PublicPassword-1>
    </Public-1>
  </UserName-1>
  <UserName-2>
    <Private-2>
      <PrivateFtpAccountId-2>33333</PrivateFtpAccountId-2>
      <PrivatePassword-2>test3</PrivatePassword-2>
    </Private-2>
    <Public-2>
      <PublicFtpAccountId-2>44444</PublicFtpAccountId-2>
      <PublicPassword-2>test4</PublicPassword-2>
    </Public-2>
  </UserName-2>
  <UserName-3 />
  <Private-3>
    <PrivateFtpAccountId-3>55555</PrivateFtpAccountId-3>
    <PrivatePassword-3>test5</PrivatePassword-3>
  </Private-3>
  <Public-3>
    <PublicFtpAccountId-3>66666</PublicFtpAccountId-3>
    <PublicPassword-3>test6</PublicPassword-3>
  </Public-3>
</Users>

```

But having trouble...

```
  Named <UserName-3 /> instead of <UserName-3>   <--- where is the / at the end coming from in the beginning tag?
  Did not indent properly
  No closing tag for this element 

```

My code in a console app:

```
    Dim strId As String
    Dim strPrivateFtpAcctId As String
    Dim strPrivatePassword As String
    Dim strPublicFtpAcctId As String
    Dim strPublicPassword As String

    strPrivateFtpAcctId = "55555"
    strPrivatePassword = "test5"
    strPublicFtpAcctId = "66666"
    strPublicPassword = "test6"
    strId = "3"

    ' Setting these variables above for now but they would actually be coming in as arguments and hence will be dynamically set at runtime.

    Dim xEle As XElement = XElement.Load("MyGoodXMLforadding.xml")
    xEle.Add(New XElement("UserName-" & strId))
    xEle.Add(New XElement("Private-" & strId, New XElement("PrivateFtpAccountId-" & strId, strPrivateFtpAcctId), New XElement("PrivatePassword-" & strId, srPrivatePassword)))
    xEle.Add(New XElement("Public-" & strId, New XElement("PublicFtpAccountId-" & strId, strPublicFtpAcctId), New XElement("PublicPassword-" & strId, "test6")))

    ' Save in place.
    xEle.Save("MyGoodXMLforadding.xml")

```

I even hardcoded a value for this:

```
    xEle.Add(New XElement("UserName-3"))

```

and I still get the same thing.

Regards...Dan