Results 1 to 2 of 2

Thread: Help with XML Serialization please.

  1. #1

    Thread Starter
    Banned
    Join Date
    Oct 2005
    Posts
    22

    Help with XML Serialization please.

    At work we have a set of raw XML config files (for which there is no schema available (unfortunately)).

    Now, it is my task to create a class structure (heirerarchy) that is able to load and save this kind of XML file. I have gotten 80% of the way there but I can't quite figure out how to store an array of items without having the outer tag..

    I don't want these 2 tags (but I can't work out how to get rid of them)...

    Code:
    <MyObject>
    <ArrayOfThingies>
    <Thingy name="A"/>
    <Thingy name="B"/>
    <Thingy name="C"/>
    <Thingy name="D"/>
    </ArrayOfThingies>
    </MyObject>
    I can't show you the code I'm afraid (top secret ) but if someone could give a really simple example of how to have array data inside XML without the array object tags I would be most grateful.

    Many thanks.

    tp.

  2. #2
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: Help with XML Serialization please.

    In the past I've created a class to format the xml exacatly how I want it, before reading it into a dataset.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width