Deserializing XML file

S

Sriranjan

Hi,

How do I deserialize an object based on a random XML file? I have tried
using the XMLSerializer.Deserialize method but it does not set the
values for the members. I need tto do this because I am trying to
invooke a web service by passing this object as the input.

Here is the sample XML file which I am trying to deserialize:

- <ItemSearch xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SubscriptionId>1VCN8RB15QCDW22CGY82</SubscriptionId>
<AssociateTag>aTag</AssociateTag>
<AWSAccessKeyId>accesskey</AWSAccessKeyId>
<MarketplaceDomain>market</MarketplaceDomain>
<Request />
<Shared />
<Validate>invalidate</Validate>
<XMLEscaping>escaped</XMLEscaping>
</ItemSearch>

Thanks,
Sri
 
S

sloan

http://spaces.msn.com/sholliday/ 9/21/2005

I have a pretty comprehensive example at my blog (above).

It shows how to do :

A single object
A collection of simple objects.
An object with a collection of subobjects.

But you'll see how to do yours very quickly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top