I have XML file where some elements are resources inside. like
<cim:BusbarSection rdf:ID="Busbar_05" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cim="http://iec.ch/TC57/2001/CIM-schema-cim10#">
<cim:Naming.name>30189P0205_Busbar_01</cim:Naming.name>
<cim:Equipment.MemberOf_EquipmentContainter rdf:resource="#VL_05" />
</cim:BusbarSection>
See the Equipment.Equipment.MemberOf_EquipmentContainter is a resource define in a same XML file but somewhere else like
<cim:VoltageLevel rdf:ID="VL_05" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cim="http://iec.ch/TC57/2001/CIM-schema-cim10#">
<cim:Naming.name>VL_0.22_1</cim:Naming.name>
<cim:VoltageLevel.MemberOf_Substation rdf:resource="#Substation_01" />
<cim:VoltageLevel.BaseVoltage rdf:resource="#BaseVoltage_02" /></cim:VoltageLevel>
In my C# code, i have class structure Like
[XmlType("BusbarSection", Namespace = "http://iec.ch/TC57/2001/CIM-schema-cim10#")]
public class BusbarSection:Connector
{
public BusbarSection()
{
}
}
public class Connector:Core.ConductingEquipment
{
public Connector()
{
}
}
public class ConductingEquipment:Equipment
{
//functions and constcturess...
}
public class Equipment:PowerSystemResource
{
[XmlElement("Equipment.MemberOf_EquipmentContainer")]
public EquipmentContainer MemberOf_EquipmentContainer;
public Equipment()
{
}
}
public class EquipmentContainer:PowerSystemResource
{
public Topology.ConnectivityNode[] ConnectivityNodes;
public Equipment[] Contains_Equipments;
public EquipmentContainer()
{
}
}
I am trying to serialize the xml file, it is working good but the elements with as resource EquipmentContainer is coming null.
I am not sure how to serialize xml elements that are as resources in xml. I am missing some concepts in serialization of xmls in c# , i couldn't find how to look for help / Google this question.