[Mono-list] what structure should I use
Jonathan Pryor
jonpryor at vt.edu
Wed Feb 1 18:13:19 EST 2006
On Wed, 2006-02-01 at 23:12 +0100, Malte Dreschert wrote:
> I want to read a textfile that contains the description of a hierarchy.
> The hierarchy has nodes, which hae certain Attributes like name,
> parentnode, translation and orientation. What is the best way to store
> this kind of information? I was wondering if I can create a class (ie.
> "node"), that has the Attributes as Members. I want to create an Object
> of the class for each node in the file with the correct attributes and
> store these Objects in an array. But I don't know if this is possible
> and a smart thing to do.
Sounds like the perfect scenario for XML Serialization. See the
attached program (xs.cs) which reads and writes the attached XML file
(new.xml).
- Jon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xs.cs
Type: text/x-csharp
Size: 1774 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20060201/63b9a595/xs.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new.xml
Type: text/xml
Size: 834 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20060201/63b9a595/new.xml
More information about the Mono-list
mailing list