I'm not really familliar with the way you read the XML elements so this code might need some tweaking but this should be along the lines of what you're looking for (also took the liberty of making your properties autoimplemented for higher code readability)
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
namespace Program
{
public class ContactPersonType
{
public string ID { get; set; }
public string Name { get; set; }
}
public class ContactPerson
{
public ContactPersonType JobRole { get; set; }
public static ObservableCollection<ContactPerson> GetContactPerson()
{
var contactPersons = new ObservableCollection<ContactPerson>();
XElement doc = XElement.Load("contactpersoon.xml");
var contacts = doc.Elements("contact");
for (int i = 0; i < contacts.Count(); i++)
{
contactPersons.Add(new ContactPerson
{
JobRole = new ContactPersonType
{
ID = i.ToString(),
Name = contacts.ElementAt(i).Element("jobrole").Value
}
});
}
return contactPersons;
}
}
}
Depending on how you set the ID property you could possibly rewrite the loop as a foreach. For more info on XElement and it's members, check out http://msdn.microsoft.com/en-us/library/system.xml.linq.xelement(v=vs.110).aspx and http://msdn.microsoft.com/en-us/vstudio/bb688087.aspx