Hi, using xds.exe i created following class:
namespace vgtunesWPF
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
public partial class Library
{
private LibraryTrack[] mediaField;
private string playListsField;
/// <remarks/>
[System.Xml.Serialization.XmlArrayItemAttribute("Track", IsNullable = false)]
public LibraryTrack[] Media
{
get
{
return this.mediaField;
}
set
{
this.mediaField = value;
}
}
/// <remarks/>
public string PlayLists
{
get
{
return this.playListsField;
}
set
{
this.playListsField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class LibraryTrack
{
private string idField;
private string locationField;
private string titleField;
private string artistField;
private string albumField;
private string jaarField;
private string genreField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType = "ID")]
public string ID
{
get
{
return this.idField;
}
set
{
this.idField = value;
}
}
/// <remarks/>
public string Location
{
get
{
return this.locationField;
}
set
{
this.locationField = value;
}
}
/// <remarks/>
public string Title
{
get
{
return this.titleField;
}
set
{
this.titleField = value;
}
}
/// <remarks/>
public string Artist
{
get
{
return this.artistField;
}
set
{
this.artistField = value;
}
}
/// <remarks/>
public string Album
{
get
{
return this.albumField;
}
set
{
this.albumField = value;
}
}
/// <remarks/>
public string Jaar
{
get
{
return this.jaarField;
}
set
{
this.jaarField = value;
}
}
/// <remarks/>
public string Genre
{
get
{
return this.genreField;
}
set
{
this.genreField = value;
}
}
}
}
it is used to create following XML:
<Library>
<Media>
<Track>
<ID>0</ID>
<Location>url</Location>
<Title>title</Title>
<Artist>artist</Artist>
<Album>album</Album>
<Jaar>year</Jaar>
<Genre>genre</Genre>
</Track>
<ID>1</ID>
<Location>url</Location>
<Title>title</Title>
<Artist>artist</Artist>
<Album>album</Album>
<Jaar>year</Jaar>
<Genre>genre</Genre>
</Track>
</Media>
</Library>
the problem here is thus that i don't have a clue how to fill the xml while keeping the data stored in it.