Deserializing memory stream into XML instead of structure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RobinS

    Deserializing memory stream into XML instead of structure

    I inherited some code that calls a web service that returns an encrypted
    string. It gets decrypted into a string and then converted to a memory
    stream.

    MemoryStream ms = new
    MemoryStream(Co nvert.FromBase6 4String(decrypt edresult));

    This is then deserialized into an instance of the structure:

    BinaryFormatter bf = new BinaryFormatter ();

    ProductDetails pd = (ProductDetails )bf.Deserialize (ms);

    And then I can access the fields.

    I want to remove the dependence on knowing the structure, and deserialize it
    into an XML string that I can parse for fields and values. Is that possible,
    and how would I go about doing that?

    Thanks in advance,
    RobinS.
    GoldMail, Inc.


Working...