How to write XML file from a variable structure?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter van der veen

    #1

    How to write XML file from a variable structure?

    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.Fir stname = "peter"
    people.Nama.las tname = "van der Veen"
    people.adress.s treet = "street"
    people.adress.n umber = "2"

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

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

    without to write it out complete in code?


    Peter
  • Cerebrus

    #2
    Re: How to write XML file from a variable structure?

    Use the XmlSerializer Class... It has all you require.

    Regards,

    Cerebrus.

    Comment

    • Peter van der veen

      #3
      Re: How to write XML file from a variable structure?

      Thx a lot


      On 2 Mar 2006 06:01:15 -0800, "Cerebrus" <zorg007@sify.c om> wrote:
      [color=blue]
      >Use the XmlSerializer Class... It has all you require.
      >
      >Regards,
      >
      >Cerebrus.[/color]

      Comment

      Working...