Hi,
how do I synchronize (to XML using XmlSerializer) something to this:
<Alignments name="Road Project">
<Alignment name="Centerlin e">
<CoordGeom>
<Line staStart="0">
<Start>2000 6000</Start>
<End>2186.841 6068.005</End>
</Line>
<Curve rot="cw" />
... arbitrary number of Line's and Curve's
... in arbitrary order
</CoordGeom>
... arbitrary number of CoordGeom's ...
</Alignment>
.... arbitrary number of Alignment's ...
</Alignments>
What troubles me is how to deal with the array of CoordGeom's, which are
generic arrays in the sense that they can contain either a Line or a Curve,
and any number of them.
I am using CS and have an array for each type as of now, i.e. one array for
Curve's and one for Line's. But this does not allow me to mix the order in
which they occur, so the Curve and Line elements have to be in the same
ArrayList.
I want to know how to structure my classes and what to make XmlArray of.
Any tips you can give me is much appreciated, thank you.
--
Daniel
how do I synchronize (to XML using XmlSerializer) something to this:
<Alignments name="Road Project">
<Alignment name="Centerlin e">
<CoordGeom>
<Line staStart="0">
<Start>2000 6000</Start>
<End>2186.841 6068.005</End>
</Line>
<Curve rot="cw" />
... arbitrary number of Line's and Curve's
... in arbitrary order
</CoordGeom>
... arbitrary number of CoordGeom's ...
</Alignment>
.... arbitrary number of Alignment's ...
</Alignments>
What troubles me is how to deal with the array of CoordGeom's, which are
generic arrays in the sense that they can contain either a Line or a Curve,
and any number of them.
I am using CS and have an array for each type as of now, i.e. one array for
Curve's and one for Line's. But this does not allow me to mix the order in
which they occur, so the Curve and Line elements have to be in the same
ArrayList.
I want to know how to structure my classes and what to make XmlArray of.
Any tips you can give me is much appreciated, thank you.
--
Daniel
Comment