Question: I'm trying to figure out to to combine a serialized object with an existing xml doc and return it as a webservice.

Thanks ahead for you help.

Sample code:

```
[WebMethod]
    public string GetApple()
    {

    Apples apples = Report.GetReport();
    //  this returns:
        //  <Apples xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
        //  <Name>Smtih</Name>
        //  <Size>11</Size>
        //  <Weight>111</Weight>
        //  <Color>Red</Color>
        //  </Apples>

    string TemplatePath = Server.MapPath("~/Template.xml");
        // this is:
        // <?xml version="1.0" encoding="utf-8" ?>
        // <applereport>
        //  <moretags>
        //    <july>
        //      <report>
        //        <DATA-GOES-HERE></DATA-GOES-HERE>
        //      </report>
        //    </july>
        //  </moretags>
        // </applereport>

        // Read TemplatePath into a memory stream
        // find the node: <DATA-GOES-HERE></DATA-GOES-HERE>
        // 
        // put serialixed output of Report.GetReport() where <DATA-GOES-HERE></DATA-GOES-HERE> is

        return FullReport;
}

```

Answer: 
> So does this mean the byte which makes up the character is being XORed?

Exactly.

> What does this look like?

As any other XOR :) . In ASCII "A nice cat" is (in hexadecimal)

```
41 20 6E 69 63 65 20 63 61 74

```

and ABCDEFGHIJ

```
41 42 43 44 45 46 47 48 49 4A

```

so, if you XOR each byte with each other, you get

```
00 62 2D 2D 26 23 67 2B 28 3E

```

, which is the hexadecimal representation of "\0b--&#g+(>", i.e. the string that is displayed when you run that code.

Notice that if you XOR again the resulting text you get back the text with which you started; this the reason why XOR is used often in encoding and cyphering.
This is a simple demonstration of one time pad encryption, which as you can see is quite simple and also happens to be the only provably unbreakable form of encryption. Due to it being symmetric and having a key as large as the message, it's often not practical, but it still has a number of interesting applications.. :-)

One fun thing to notice if you're not already familiar with it is the symmetry between the key and the ciphertext. After generating them, there's no distinction of which one is which, i.e. which one was created first and which was based on the plaintext xor'd with the other. Aside from basic encryption this also leads to applications in plausible deniability.