Home All Groups Group Topic Archive Search About

How to write XML file from a variable structure?

Author
2 Mar 2006 10:38 AM
Peter van der veen <>
Hi

From a webservice i got some data and i can use that in my application
with the use of the WSDL file.
So i got an variable in with are the rest of the data.
lets say i got a structure like this in the var People

People.Name.Firstname = "peter"
people.Nama.lastname = "van der Veen"
people.adress.street = "street"
people.adress.number = "2"

Is there a simple way to write such  to an XML file so  i get

<people>
    <Name>
        <Firstname>Peter</Firstname>
        <Lastname>ven der Veen</Lastname>
    </Name>
etc.

without to write it out complete in code?


Peter

Author
2 Mar 2006 2:01 PM
Cerebrus
Use the XmlSerializer Class... It has all you require.

Regards,

Cerebrus.
Author
2 Mar 2006 3:47 PM
Peter van der veen <>
Thx a lot


Show quoteHide quote
On 2 Mar 2006 06:01:15 -0800, "Cerebrus" <zorg***@sify.com> wrote:

>Use the XmlSerializer Class... It has all you require.
>
>Regards,
>
>Cerebrus.