[Mono-list] Probleme with XML

Julien Sobrier julien at sobrier.net
Sat Aug 19 01:48:15 EDT 2006

I have an XML that looks like this (simplified):
    <schemalist module="xxxx">

I have the corresponding C# objects (simplified also):

public class Schemafile
    private Module module;
    [XmlElement("schemalist", typeof(Module))]
    public Module ModuleName
        get { return module; }
        set { module = value; }

public class Module
    [XmlElement("schema", typeof(Setting))]
    public ArrayList SchemaList = new ArrayList();

    [XmlAttribute("module", typeof(string))]
    public string Name
        get { return name; }
        set { name = value;}

 public class Setting

The object Schemafile is created with the right ModuleName. Module is
created with the right Name, but SchemaList is empty. Setting is created

Every time I have something like this, ArrayList is always empty:
XmlElement("element", typeof(Element))]
public ArrayList SomeList = new ArrayList();

I don't know what I am missing. I couldn't find similar examples on the web.

Thank you

More information about the Mono-list mailing list