Is All Simple Type from XmlSchemaElement - CSharp System.Xml

CSharp examples for System.Xml:XML Element

Description

Is All Simple Type from XmlSchemaElement

Demo Code


using System.Xml.Schema;
using System.Xml;
using System.Text;
using System.Linq;
using System.Diagnostics;
using System.Collections.Generic;
using System.Collections;
using System;//from  ww  w  .  j  a v  a 2  s. co m

public class Main{
        public static bool IsAllSimpleType(List<XmlSchemaElement> elements)
        {
            bool allSimple = true;

            foreach (XmlSchemaElement element in elements)
            {
                if (!IsSimpleType(element))
                {
                    allSimple = false;
                }
            }

            return allSimple;
        }
}

Related Tutorials