Problem Load Graph from Xml

Hello,
I have a problem when I’m trying to generate a graph using a XML file. In this graph I have some objects (different kinds of nodes), for example: an InterfaceNode, ApplicationNode, and a NodoBase with the common properties to all node kinds. I’m charging the XML in this way: model.Load<NodeBase, RelationShip>(root, “NodeBase”, “RelationShip”); In this way, it’s charging only the node properties but not the specifics to each node. The method that I’m using to charge the properties is the following (to ApplicationNode and the other ones):

public override void LoadFromXElement(XElement e)
{
base.LoadFromXElement(e);
this.ObjectivesExpanded = XHelper.Read(“ObjectivesExpanded”, e, false);
this.ProvidedInterfacesExpanded = XHelper.Read(“ProvidedInterfacesExpanded”, e, false);
this.UsedInterfacesExpanded = XHelper.Read(“UsedInterfacesExpanded”, e, false);
this.ApplicationsExpanded = XHelper.Read(“ApplicationsExpanded”, e, false);
this.InformationUnitsExpanded = XHelper.Read(“InformationUnitsExpanded”, e, false);
this.InvolvedsExpanded = XHelper.Read(“InvolvedsExpanded”, e, false);
this.ProjectsExpanded = XHelper.Read(“ProjectsExpanded”, e, false);
this.ModulesExpanded = XHelper.Read(“ModulesExpanded”, e, false);
this.ModulesExpanded = XHelper.Read(“ModulesExpanded”, e, false);
}

The problem is that it’s not charging the specific properties to each nod

Take a look at the Piping sample. It defines the ItemData class as the base for three different kinds of node data classes. For each derived class there is an override of MakeXElement and LoadFromXElement, and they all call the base method first.

But the crucial point is that that sample calls:
model.Load<ItemData, PipeData>(root, AllocateItemData, AllocatePipeData);
which uses the overload of the Load method that takes methods for allocating the data.

Thank you Walter, but I don’t have these overcharge of the load method, the load method that I have is:

public void Load<NodeDataType, LinkDataType>(XContainer root, XName nodename, XName linkname)
where NodeDataType : GraphLinksModelNodeData, new()
where LinkDataType : GraphLinksModelLinkData<NodeKey, PortKey>, new();
My version have is 1.1.9.4

Ah, you’ll need to upgrade to version 1.2.

i have the version 1.1.9.4 and the example version is 1.2.6.4, I don’t know if the licence that I have it’s useable with this version

I believe you are eligible for the upgrade.

Walter tnx for you help