title: C# XML - Why does this Code keep failing with 0x3A Error?
body: <p>i have following code example:</p>
  
  <pre><code>PlentySoapRequest_GetAuthentificationToken username = new PlentySoapRequest_GetAuthentificationToken();
  
          username.Username = user_textbox.ToString();
          username.Userpass = password_textbox.ToString();
  
          Uri uri = new Uri("http://www.****.de/plenty/api/soap/version105/");
  
  
          XNamespace soapenv = @"http://schemas.xmlsoap.org/soap/envelope/";
          XNamespace xsi = @"http://www.w3.org/2001/XMLSchema-instance";
          XNamespace xsd = @"http://www.w3.org/2001/XMLSchema";
          XNamespace ver = @"http://www.****.de/plenty/api/soap/version105/";
  
          var document = new XDocument(
             new XDeclaration("1.0", "utf-8", String.Empty),
             new XElement(soapenv + "Envelope",
                 new XAttribute(XNamespace.Xmlns + "xsi", xsi),
                 new XAttribute(XNamespace.Xmlns + "xsd" , xsd),
                 new XAttribute(XNamespace.Xmlns + "soapenv" , soapenv),
                 new XAttribute(XNamespace.Xmlns + "ver" , ver),
             new XElement(soapenv + "Header"),
             new XElement(soapenv + "Body",
                     new XElement(ver + "GetAuthentificationToken",
                          new XElement("oLogin" + xsi + "type" + ver + "PlentySoapRequest_GetAuthentificationToken",
                              new XAttribute("Username" + xsi + "type" + xsd + "string", username.Username),
                              new XAttribute("Userpass" + xsi + "type" + xsd + "string", username.Userpass)
                             )
                          )
                      )
                  )
                 );
  </code></pre>
  
  <p>I keep getting the error message in the first line. "plentysoaprequest...."</p>
  
  <pre><code>The ':' character, hexadecimal value 0x3A, cannot be included in a name.
  </code></pre>
  
  <p>if I comment out those lines, it keeps say it is in the first line of the code.</p>
  
  <p><strong>Edit:</strong>
  the xml should look like this:</p>
  
  <pre><code>&lt;soapenv:Body&gt;
    &lt;ver:GetAuthentificationToken&gt;
       &lt;oLogin xsi:type="ver:PlentySoapRequest_GetAuthentificationToken"&gt;
          &lt;!--You may enter the following 2 items in any order--&gt;
          &lt;Username xsi:type="xsd:string"&gt;apitest&lt;/Username&gt;
          &lt;Userpass xsi:type="xsd:string"&gt;apitest&lt;/Userpass&gt;
       &lt;/oLogin&gt;
    &lt;/ver:GetAuthentificationToken&gt;
  </code></pre>
  
  <p></p>
  
  <p>so there seems to be a problem with the xml-sysntax.
  I cant figure out how to set <strong>xsi:type</strong> or <strong>xsi:type</strong></p>