CSharp examples for System.Xml:XML Element
Get All Complex Elements from XmlSchemaElement
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;// w ww . j av a 2 s . c om public class Main{ public static List<XmlSchemaElement> GetAllComplexElements(List<XmlSchemaElement> elements) { List<XmlSchemaElement> simpleElementList = new List<XmlSchemaElement>(); foreach (XmlSchemaElement element in elements) { if (!IsSimpleType(element)) simpleElementList.Add(element); } return simpleElementList; } }