private static void NodeTypeToXml(NodeType nt, StringBuilder sb, string indent)
{
// <NodeType itemID="1" name="NodeType1">
sb.Append(indent).Append("<NodeType");
sb.Append(" itemID=\"").Append(nt.Id).Append("\"");
sb.Append(" name=\"").Append(nt.Name).Append("\"");
if(nt.ClassName != null)
sb.Append(" className=\"").Append(nt.ClassName).Append("\"");
if (nt.DeclaredPropertyTypes.Count == 0 && nt.Children.Count == 0)
{
sb.AppendLine(" />");
return;
}
sb.AppendLine(">");
//-- Inherited PropertyTypes are not be written
foreach (PropertyType pt in nt.DeclaredPropertyTypes)
PropertyTypeReferenceToXml(pt/*, nt*/, sb, indent + "\t");
//-- Types that are inherited from "nt"
foreach (NodeType cnt in nt.Children)
NodeTypeToXml(cnt, sb, indent + "\t");
sb.Append(indent).AppendLine("</NodeType>");
}
private static void ContentListTypeToXml(ContentListType lt, StringBuilder sb, string indent)