コード例 #1
0
        public static XElement CreateXmlNode(XNamespace Ns, Boundaries R)
        {
            XElement el = new XElement(Constants.BOUNDARIES);

            foreach (Boundary item in R.BoundaryList)
            {
                el.Add(Boundary.CreateXmlNode(Ns, item));
            }

            return(el);
        }
コード例 #2
0
        public static Boundaries ParseXmlNode(XElement Node)
        {
            Boundaries b = new Boundaries();

            IEnumerable <XElement> nodeliste = Node.Elements();

            foreach (XElement item in nodeliste)
            {
                switch (item.Name.LocalName)
                {
                case Constants.BOUNDARY:
                    b.AddBoundary(Boundary.ParseXmlNode(item));
                    break;

                default:
                    break;
                }
            }
            return(b);
        }