Example #1
0
        public DenominatorTerm(XmlNode xmlNode)
        {
            XmlNodeList weightedPartialNodeList = xmlNode.SelectNodes("weightedPartial");

            if (weightedPartialNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in weightedPartialNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        weightedPartialIDRef = item.Attributes["id"].Name;
                        WeightedPartialDerivative ob = WeightedPartialDerivative();
                        IDManager.SetID(weightedPartialIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        weightedPartialIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        weightedPartial = new WeightedPartialDerivative(item);
                    }
                }
            }


            XmlNodeList powerNodeList = xmlNode.SelectNodes("power");

            if (powerNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in powerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        powerIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(powerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        powerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        power = new XsdTypePositiveInteger(item);
                    }
                }
            }
        }
 public DenominatorTerm(XmlNode xmlNode)
 {
     XmlNode weightedPartialNode = xmlNode.SelectSingleNode("weightedPartial");
     
     if (weightedPartialNode != null)
     {
         if (weightedPartialNode.Attributes["href"] != null || weightedPartialNode.Attributes["id"] != null) 
         {
             if (weightedPartialNode.Attributes["id"] != null) 
             {
                 weightedPartialIDRef_ = weightedPartialNode.Attributes["id"].Value;
                 WeightedPartialDerivative ob = new WeightedPartialDerivative(weightedPartialNode);
                 IDManager.SetID(weightedPartialIDRef_, ob);
             }
             else if (weightedPartialNode.Attributes["href"] != null)
             {
                 weightedPartialIDRef_ = weightedPartialNode.Attributes["href"].Value;
             }
             else
             {
                 weightedPartial_ = new WeightedPartialDerivative(weightedPartialNode);
             }
         }
         else
         {
             weightedPartial_ = new WeightedPartialDerivative(weightedPartialNode);
         }
     }
     
 
     XmlNode powerNode = xmlNode.SelectSingleNode("power");
     
     if (powerNode != null)
     {
         if (powerNode.Attributes["href"] != null || powerNode.Attributes["id"] != null) 
         {
             if (powerNode.Attributes["id"] != null) 
             {
                 powerIDRef_ = powerNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(powerNode);
                 IDManager.SetID(powerIDRef_, ob);
             }
             else if (powerNode.Attributes["href"] != null)
             {
                 powerIDRef_ = powerNode.Attributes["href"].Value;
             }
             else
             {
                 power_ = new XsdTypePositiveInteger(powerNode);
             }
         }
         else
         {
             power_ = new XsdTypePositiveInteger(powerNode);
         }
     }
     
 
 }
 public DenominatorTerm(XmlNode xmlNode)
 {
     XmlNodeList weightedPartialNodeList = xmlNode.SelectNodes("weightedPartial");
     if (weightedPartialNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weightedPartialNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weightedPartialIDRef = item.Attributes["id"].Name;
                 WeightedPartialDerivative ob = WeightedPartialDerivative();
                 IDManager.SetID(weightedPartialIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weightedPartialIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weightedPartial = new WeightedPartialDerivative(item);
             }
         }
     }
     
 
     XmlNodeList powerNodeList = xmlNode.SelectNodes("power");
     if (powerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in powerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 powerIDRef = item.Attributes["id"].Name;
                 XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                 IDManager.SetID(powerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 powerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 power = new XsdTypePositiveInteger(item);
             }
         }
     }
     
 
 }
Example #4
0
        public DenominatorTerm(XmlNode xmlNode)
        {
            XmlNode weightedPartialNode = xmlNode.SelectSingleNode("weightedPartial");

            if (weightedPartialNode != null)
            {
                if (weightedPartialNode.Attributes["href"] != null || weightedPartialNode.Attributes["id"] != null)
                {
                    if (weightedPartialNode.Attributes["id"] != null)
                    {
                        weightedPartialIDRef_ = weightedPartialNode.Attributes["id"].Value;
                        WeightedPartialDerivative ob = new WeightedPartialDerivative(weightedPartialNode);
                        IDManager.SetID(weightedPartialIDRef_, ob);
                    }
                    else if (weightedPartialNode.Attributes["href"] != null)
                    {
                        weightedPartialIDRef_ = weightedPartialNode.Attributes["href"].Value;
                    }
                    else
                    {
                        weightedPartial_ = new WeightedPartialDerivative(weightedPartialNode);
                    }
                }
                else
                {
                    weightedPartial_ = new WeightedPartialDerivative(weightedPartialNode);
                }
            }


            XmlNode powerNode = xmlNode.SelectSingleNode("power");

            if (powerNode != null)
            {
                if (powerNode.Attributes["href"] != null || powerNode.Attributes["id"] != null)
                {
                    if (powerNode.Attributes["id"] != null)
                    {
                        powerIDRef_ = powerNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(powerNode);
                        IDManager.SetID(powerIDRef_, ob);
                    }
                    else if (powerNode.Attributes["href"] != null)
                    {
                        powerIDRef_ = powerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        power_ = new XsdTypePositiveInteger(powerNode);
                    }
                }
                else
                {
                    power_ = new XsdTypePositiveInteger(powerNode);
                }
            }
        }