public DerivativeFormula(XmlNode xmlNode)
        {
            XmlNodeList termNodeList = xmlNode.SelectNodes("term");

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

            foreach (XmlNode item in termNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        termIDRef = item.Attributes["id"].Name;
                        FormulaTerm ob = FormulaTerm();
                        IDManager.SetID(termIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        termIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        term = new FormulaTerm(item);
                    }
                }
            }


            XmlNodeList denominatorTermNodeList = xmlNode.SelectNodes("denominatorTerm");

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

            foreach (XmlNode item in denominatorTermNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        denominatorTermIDRef = item.Attributes["id"].Name;
                        DenominatorTerm ob = DenominatorTerm();
                        IDManager.SetID(denominatorTermIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        denominatorTermIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        denominatorTerm = new DenominatorTerm(item);
                    }
                }
            }
        }
 public DerivativeFormula(XmlNode xmlNode)
 {
     XmlNode termNode = xmlNode.SelectSingleNode("term");
     
     if (termNode != null)
     {
         if (termNode.Attributes["href"] != null || termNode.Attributes["id"] != null) 
         {
             if (termNode.Attributes["id"] != null) 
             {
                 termIDRef_ = termNode.Attributes["id"].Value;
                 FormulaTerm ob = new FormulaTerm(termNode);
                 IDManager.SetID(termIDRef_, ob);
             }
             else if (termNode.Attributes["href"] != null)
             {
                 termIDRef_ = termNode.Attributes["href"].Value;
             }
             else
             {
                 term_ = new FormulaTerm(termNode);
             }
         }
         else
         {
             term_ = new FormulaTerm(termNode);
         }
     }
     
 
     XmlNode denominatorTermNode = xmlNode.SelectSingleNode("denominatorTerm");
     
     if (denominatorTermNode != null)
     {
         if (denominatorTermNode.Attributes["href"] != null || denominatorTermNode.Attributes["id"] != null) 
         {
             if (denominatorTermNode.Attributes["id"] != null) 
             {
                 denominatorTermIDRef_ = denominatorTermNode.Attributes["id"].Value;
                 DenominatorTerm ob = new DenominatorTerm(denominatorTermNode);
                 IDManager.SetID(denominatorTermIDRef_, ob);
             }
             else if (denominatorTermNode.Attributes["href"] != null)
             {
                 denominatorTermIDRef_ = denominatorTermNode.Attributes["href"].Value;
             }
             else
             {
                 denominatorTerm_ = new DenominatorTerm(denominatorTermNode);
             }
         }
         else
         {
             denominatorTerm_ = new DenominatorTerm(denominatorTermNode);
         }
     }
     
 
 }
 public DerivativeFormula(XmlNode xmlNode)
 {
     XmlNodeList termNodeList = xmlNode.SelectNodes("term");
     if (termNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in termNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 termIDRef = item.Attributes["id"].Name;
                 FormulaTerm ob = FormulaTerm();
                 IDManager.SetID(termIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 termIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 term = new FormulaTerm(item);
             }
         }
     }
     
 
     XmlNodeList denominatorTermNodeList = xmlNode.SelectNodes("denominatorTerm");
     if (denominatorTermNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in denominatorTermNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 denominatorTermIDRef = item.Attributes["id"].Name;
                 DenominatorTerm ob = DenominatorTerm();
                 IDManager.SetID(denominatorTermIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 denominatorTermIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 denominatorTerm = new DenominatorTerm(item);
             }
         }
     }
     
 
 }
Example #4
0
        public DerivativeFormula(XmlNode xmlNode)
        {
            XmlNode termNode = xmlNode.SelectSingleNode("term");

            if (termNode != null)
            {
                if (termNode.Attributes["href"] != null || termNode.Attributes["id"] != null)
                {
                    if (termNode.Attributes["id"] != null)
                    {
                        termIDRef_ = termNode.Attributes["id"].Value;
                        FormulaTerm ob = new FormulaTerm(termNode);
                        IDManager.SetID(termIDRef_, ob);
                    }
                    else if (termNode.Attributes["href"] != null)
                    {
                        termIDRef_ = termNode.Attributes["href"].Value;
                    }
                    else
                    {
                        term_ = new FormulaTerm(termNode);
                    }
                }
                else
                {
                    term_ = new FormulaTerm(termNode);
                }
            }


            XmlNode denominatorTermNode = xmlNode.SelectSingleNode("denominatorTerm");

            if (denominatorTermNode != null)
            {
                if (denominatorTermNode.Attributes["href"] != null || denominatorTermNode.Attributes["id"] != null)
                {
                    if (denominatorTermNode.Attributes["id"] != null)
                    {
                        denominatorTermIDRef_ = denominatorTermNode.Attributes["id"].Value;
                        DenominatorTerm ob = new DenominatorTerm(denominatorTermNode);
                        IDManager.SetID(denominatorTermIDRef_, ob);
                    }
                    else if (denominatorTermNode.Attributes["href"] != null)
                    {
                        denominatorTermIDRef_ = denominatorTermNode.Attributes["href"].Value;
                    }
                    else
                    {
                        denominatorTerm_ = new DenominatorTerm(denominatorTermNode);
                    }
                }
                else
                {
                    denominatorTerm_ = new DenominatorTerm(denominatorTermNode);
                }
            }
        }