G
Guest
Hello
I'm trying to save my data to xml via serializing but I'm a bit lost. Below
is my setup at the moment, one project wrapper class that contains general
project info and a list of every node (nodeA, nodeB etc)
namespace xyz
{
public class project
{
public string m_strName;
public string m_strDesc;
public ArrayList nodes;
}
public Base
{
public int m_ID;
// other
}
public nodeA : Base
{
public int m_Type;
public int a;
}
public nodeB : Base
{
public int m_Type;
public int b;
}
}
I'm trying to get a xml file that looks something like this:
<Project
Name = "Local"
Description = "Something"<NodeA
ID = "1"
Type = "A"
a = "1"
/>
<NodeA
ID = "12"
Type = "A"
a = "12"
/>
<NodeB
ID = "21"
Type = "B"
b = "33"
/>
<NodeB
ID = "25"
Type = "B"
b = "12"
/>
</Project>
Appreciate any help.
I'm trying to save my data to xml via serializing but I'm a bit lost. Below
is my setup at the moment, one project wrapper class that contains general
project info and a list of every node (nodeA, nodeB etc)
namespace xyz
{
public class project
{
public string m_strName;
public string m_strDesc;
public ArrayList nodes;
}
public Base
{
public int m_ID;
// other
}
public nodeA : Base
{
public int m_Type;
public int a;
}
public nodeB : Base
{
public int m_Type;
public int b;
}
}
I'm trying to get a xml file that looks something like this:
<Project
Name = "Local"
Description = "Something"<NodeA
ID = "1"
Type = "A"
a = "1"
/>
<NodeA
ID = "12"
Type = "A"
a = "12"
/>
<NodeB
ID = "21"
Type = "B"
b = "33"
/>
<NodeB
ID = "25"
Type = "B"
b = "12"
/>
</Project>
Appreciate any help.