public Rounding(XmlNode xmlNode) { XmlNode roundingDirectionNode = xmlNode.SelectSingleNode("roundingDirection"); if (roundingDirectionNode != null) { if (roundingDirectionNode.Attributes["href"] != null || roundingDirectionNode.Attributes["id"] != null) { if (roundingDirectionNode.Attributes["id"] != null) { roundingDirectionIDRef_ = roundingDirectionNode.Attributes["id"].Value; RoundingDirectionEnum ob = new RoundingDirectionEnum(roundingDirectionNode); IDManager.SetID(roundingDirectionIDRef_, ob); } else if (roundingDirectionNode.Attributes["href"] != null) { roundingDirectionIDRef_ = roundingDirectionNode.Attributes["href"].Value; } else { roundingDirection_ = new RoundingDirectionEnum(roundingDirectionNode); } } else { roundingDirection_ = new RoundingDirectionEnum(roundingDirectionNode); } } XmlNode precisionNode = xmlNode.SelectSingleNode("precision"); if (precisionNode != null) { if (precisionNode.Attributes["href"] != null || precisionNode.Attributes["id"] != null) { if (precisionNode.Attributes["id"] != null) { precisionIDRef_ = precisionNode.Attributes["id"].Value; XsdTypeNonNegativeInteger ob = new XsdTypeNonNegativeInteger(precisionNode); IDManager.SetID(precisionIDRef_, ob); } else if (precisionNode.Attributes["href"] != null) { precisionIDRef_ = precisionNode.Attributes["href"].Value; } else { precision_ = new XsdTypeNonNegativeInteger(precisionNode); } } else { precision_ = new XsdTypeNonNegativeInteger(precisionNode); } } }
public Rounding(XmlNode xmlNode) { XmlNodeList roundingDirectionNodeList = xmlNode.SelectNodes("roundingDirection"); if (roundingDirectionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in roundingDirectionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { roundingDirectionIDRef = item.Attributes["id"].Name; RoundingDirectionEnum ob = RoundingDirectionEnum(); IDManager.SetID(roundingDirectionIDRef, ob); } else if (item.Attributes.ToString() == "href") { roundingDirectionIDRef = item.Attributes["href"].Name; } else { roundingDirection = new RoundingDirectionEnum(item); } } } XmlNodeList precisionNodeList = xmlNode.SelectNodes("precision"); if (precisionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in precisionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { precisionIDRef = item.Attributes["id"].Name; XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger(); IDManager.SetID(precisionIDRef, ob); } else if (item.Attributes.ToString() == "href") { precisionIDRef = item.Attributes["href"].Name; } else { precision = new XsdTypeNonNegativeInteger(item); } } } }