public string Build(SchemaTypeBase schemaRootType)
        {
            var result = new StringBuilder();

            Build(schemaRootType, 0, result);
            return(result.ToString());
        }
        private void Build(SchemaTypeBase nodeType, int margin, StringBuilder result)
        {
            var complexType = nodeType as SchemaComplexType;

            if (complexType == null)
            {
                return;
            }
            if (complexType.BaseType != null)
            {
                Build(complexType.BaseType, margin, result);
            }
            foreach (var child in complexType.Children)
            {
                Build(child, margin, result);
            }
        }