当前位置: 首页>>代码示例>>C#>>正文


C# XmlNode.SelectSingleNode方法代码示例

本文整理汇总了C#中System.Xml.XmlNode.SelectSingleNode方法的典型用法代码示例。如果您正苦于以下问题:C# XmlNode.SelectSingleNode方法的具体用法?C# XmlNode.SelectSingleNode怎么用?C# XmlNode.SelectSingleNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.XmlNode的用法示例。


在下文中一共展示了XmlNode.SelectSingleNode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: from

        public void from(XmlNode node, XmlNamespaceManager xnm, string prefix, string subfix)
        {
            Type type = this.GetType();
            FieldInfo[] fields = type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);

            foreach (FieldInfo field in fields)
            {
                string query = prefix +ObjectUtil.GetSimpleName(field) + subfix;
                try
                {
                    string value = null;
                    XmlNode tempNode;
                    if (xnm != null)
                    {
                        tempNode = node.SelectSingleNode(query, xnm);
                    }
                    else
                    {
                        tempNode = node.SelectSingleNode(query);
                    }
                    if (tempNode == null) {
                        field.SetValue(this,XML_NULL);
                        continue;
                    }
                    value = tempNode.InnerText;
                    field.SetValue(this, value);
                }
                catch (Exception ex) { }
            }
        }
开发者ID:uhealin,项目名称:toyz-toyz4net,代码行数:30,代码来源:BaseAdapter.cs

示例2: CreditDefaultSwapOption

 public CreditDefaultSwapOption(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode strikeNode = xmlNode.SelectSingleNode("strike");
     
     if (strikeNode != null)
     {
         if (strikeNode.Attributes["href"] != null || strikeNode.Attributes["id"] != null) 
         {
             if (strikeNode.Attributes["id"] != null) 
             {
                 strikeIDRef_ = strikeNode.Attributes["id"].Value;
                 CreditOptionStrike ob = new CreditOptionStrike(strikeNode);
                 IDManager.SetID(strikeIDRef_, ob);
             }
             else if (strikeNode.Attributes["href"] != null)
             {
                 strikeIDRef_ = strikeNode.Attributes["href"].Value;
             }
             else
             {
                 strike_ = new CreditOptionStrike(strikeNode);
             }
         }
         else
         {
             strike_ = new CreditOptionStrike(strikeNode);
         }
     }
     
 
     XmlNode creditDefaultSwapNode = xmlNode.SelectSingleNode("creditDefaultSwap");
     
     if (creditDefaultSwapNode != null)
     {
         if (creditDefaultSwapNode.Attributes["href"] != null || creditDefaultSwapNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["id"].Value;
                 CreditDefaultSwap ob = new CreditDefaultSwap(creditDefaultSwapNode);
                 IDManager.SetID(creditDefaultSwapIDRef_, ob);
             }
             else if (creditDefaultSwapNode.Attributes["href"] != null)
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
             }
         }
         else
         {
             creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
         }
     }
     
 
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:60,代码来源:CreditDefaultSwapOption.cs

示例3: Excel_cds

 public Excel_cds(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode excel_swapLegNode = xmlNode.SelectSingleNode("excel_swapLeg");
     
     if (excel_swapLegNode != null)
     {
         if (excel_swapLegNode.Attributes["href"] != null || excel_swapLegNode.Attributes["id"] != null) 
         {
             if (excel_swapLegNode.Attributes["id"] != null) 
             {
                 excel_swapLegIDRef_ = excel_swapLegNode.Attributes["id"].Value;
                 Excel_swapLeg ob = new Excel_swapLeg(excel_swapLegNode);
                 IDManager.SetID(excel_swapLegIDRef_, ob);
             }
             else if (excel_swapLegNode.Attributes["href"] != null)
             {
                 excel_swapLegIDRef_ = excel_swapLegNode.Attributes["href"].Value;
             }
             else
             {
                 excel_swapLeg_ = new Excel_swapLeg(excel_swapLegNode);
             }
         }
         else
         {
             excel_swapLeg_ = new Excel_swapLeg(excel_swapLegNode);
         }
     }
     
 
     XmlNode excel_creditEventSwapLegNode = xmlNode.SelectSingleNode("excel_creditEventSwapLeg");
     
     if (excel_creditEventSwapLegNode != null)
     {
         if (excel_creditEventSwapLegNode.Attributes["href"] != null || excel_creditEventSwapLegNode.Attributes["id"] != null) 
         {
             if (excel_creditEventSwapLegNode.Attributes["id"] != null) 
             {
                 excel_creditEventSwapLegIDRef_ = excel_creditEventSwapLegNode.Attributes["id"].Value;
                 Excel_creditEventSwapLeg ob = new Excel_creditEventSwapLeg(excel_creditEventSwapLegNode);
                 IDManager.SetID(excel_creditEventSwapLegIDRef_, ob);
             }
             else if (excel_creditEventSwapLegNode.Attributes["href"] != null)
             {
                 excel_creditEventSwapLegIDRef_ = excel_creditEventSwapLegNode.Attributes["href"].Value;
             }
             else
             {
                 excel_creditEventSwapLeg_ = new Excel_creditEventSwapLeg(excel_creditEventSwapLegNode);
             }
         }
         else
         {
             excel_creditEventSwapLeg_ = new Excel_creditEventSwapLeg(excel_creditEventSwapLegNode);
         }
     }
     
 
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:60,代码来源:Excel_cds.cs

示例4: OnSystemSettingsLoaded

        // Make sure the default company name and acronym are in the config file under system settings
        protected override void OnSystemSettingsLoaded(XmlDocument configurationFile, XmlNode systemSettingsNode)
        {
            XmlNode companyNameNode = systemSettingsNode.SelectSingleNode("add[@name = 'CompanyName']");
            XmlNode companyAcronymNode = systemSettingsNode.SelectSingleNode("add[@name = 'CompanyAcronym']");

            // Modify or add the CompanyName parameter.
            if (companyNameNode != null)
            {
                companyNameNode.Attributes["value"].Value = Context.Parameters["DP_CompanyName"];
            }
            else
            {
                companyNameNode = configurationFile.CreateNode(XmlNodeType.Element, "add", string.Empty);
                companyNameNode.Attributes.Append(CreateAttribute(configurationFile, "name", "CompanyName"));
                companyNameNode.Attributes.Append(CreateAttribute(configurationFile, "value", Context.Parameters["DP_CompanyName"]));
                companyNameNode.Attributes.Append(CreateAttribute(configurationFile, "description", "The name of the company who owns this instance of the SIEGate."));
                companyNameNode.Attributes.Append(CreateAttribute(configurationFile, "encrypted", "false"));
                systemSettingsNode.AppendChild(companyNameNode);
            }

            // Modify or add the CompanyAcronym parameter.
            if (companyAcronymNode != null)
            {
                companyAcronymNode.Attributes["value"].Value = Context.Parameters["DP_CompanyAcronym"];
            }
            else
            {
                companyAcronymNode = configurationFile.CreateNode(XmlNodeType.Element, "add", string.Empty);
                companyAcronymNode.Attributes.Append(CreateAttribute(configurationFile, "name", "CompanyAcronym"));
                companyAcronymNode.Attributes.Append(CreateAttribute(configurationFile, "value", Context.Parameters["DP_CompanyAcronym"]));
                companyAcronymNode.Attributes.Append(CreateAttribute(configurationFile, "description", "The acronym representing the company who owns this instance of the SIEGate."));
                companyAcronymNode.Attributes.Append(CreateAttribute(configurationFile, "encrypted", "false"));
                systemSettingsNode.AppendChild(companyAcronymNode);
            }
        }
开发者ID:GridProtectionAlliance,项目名称:SIEGate,代码行数:36,代码来源:ServiceInstall.cs

示例5: ExcelFontXml

 internal ExcelFontXml(XmlNamespaceManager nsm, XmlNode topNode) :
     base(nsm, topNode)
 {
     _name = GetXmlNodeString(namePath);
     _size = (float)GetXmlNodeDecimal(sizePath);
     _family = GetXmlNodeInt(familyPath);
     _scheme = GetXmlNodeString(schemePath);
     _color = new ExcelColorXml(nsm, topNode.SelectSingleNode(_colorPath, nsm));
     _bold = (topNode.SelectSingleNode(boldPath, NameSpaceManager) != null);
     _italic = (topNode.SelectSingleNode(italicPath, NameSpaceManager) != null);
     _strike = (topNode.SelectSingleNode(strikePath, NameSpaceManager) != null);
     _verticalAlign = GetXmlNodeString(verticalAlignPath);
     if (topNode.SelectSingleNode(underLinedPath, NameSpaceManager) != null)
     {
         string ut = GetXmlNodeString(underLinedPath + "/@val");
         if (ut == "")
         {
             _underlineType = ExcelUnderLineType.Single;
         }
         else
         {
             _underlineType = (ExcelUnderLineType)Enum.Parse(typeof(ExcelUnderLineType), ut, true);
         }
     }
     else
     {
         _underlineType = ExcelUnderLineType.None;
     }
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:29,代码来源:ExcelFontXml.cs

示例6: ForwardModel

 public ForwardModel(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode tenorNode = xmlNode.SelectSingleNode("tenor");
     
     if (tenorNode != null)
     {
         if (tenorNode.Attributes["href"] != null || tenorNode.Attributes["id"] != null) 
         {
             if (tenorNode.Attributes["id"] != null) 
             {
                 tenorIDRef_ = tenorNode.Attributes["id"].Value;
                 Tenor ob = new Tenor(tenorNode);
                 IDManager.SetID(tenorIDRef_, ob);
             }
             else if (tenorNode.Attributes["href"] != null)
             {
                 tenorIDRef_ = tenorNode.Attributes["href"].Value;
             }
             else
             {
                 tenor_ = new Tenor(tenorNode);
             }
         }
         else
         {
             tenor_ = new Tenor(tenorNode);
         }
     }
     
 
     XmlNode fittingYieldCurveNode = xmlNode.SelectSingleNode("fittingYieldCurve");
     
     if (fittingYieldCurveNode != null)
     {
         if (fittingYieldCurveNode.Attributes["href"] != null || fittingYieldCurveNode.Attributes["id"] != null) 
         {
             if (fittingYieldCurveNode.Attributes["id"] != null) 
             {
                 fittingYieldCurveIDRef_ = fittingYieldCurveNode.Attributes["id"].Value;
                 FittingYieldCurve ob = new FittingYieldCurve(fittingYieldCurveNode);
                 IDManager.SetID(fittingYieldCurveIDRef_, ob);
             }
             else if (fittingYieldCurveNode.Attributes["href"] != null)
             {
                 fittingYieldCurveIDRef_ = fittingYieldCurveNode.Attributes["href"].Value;
             }
             else
             {
                 fittingYieldCurve_ = new FittingYieldCurve(fittingYieldCurveNode);
             }
         }
         else
         {
             fittingYieldCurve_ = new FittingYieldCurve(fittingYieldCurveNode);
         }
     }
     
 
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:60,代码来源:ForwardModel.cs

示例7: GroupFullInfo

		internal GroupFullInfo(XmlNode node)
		{
			if( node.Attributes.GetNamedItem("id") != null )
				GroupId = node.Attributes.GetNamedItem("id").Value;
			if( node.SelectSingleNode("name") != null )
				GroupName = node.SelectSingleNode("name").InnerText;
			if( node.SelectSingleNode("description") != null )
				Description = node.SelectSingleNode("description").InnerXml;
			if( node.SelectSingleNode("members") != null )
				Members = int.Parse(node.SelectSingleNode("members").InnerText);
			if( node.SelectSingleNode("privacy") != null )
				Privacy = (PoolPrivacy)int.Parse(node.SelectSingleNode("privacy").InnerText);

			if( node.SelectSingleNode("throttle") != null )
			{
				XmlNode throttle = node.SelectSingleNode("throttle");
				ThrottleInfo = new GroupThrottleInfo();
				if( throttle.Attributes.GetNamedItem("count") != null )
					ThrottleInfo.Count = int.Parse(throttle.Attributes.GetNamedItem("count").Value);
				if( throttle.Attributes.GetNamedItem("mode") != null )
					ThrottleInfo.setMode(throttle.Attributes.GetNamedItem("mode").Value);
				if( throttle.Attributes.GetNamedItem("remaining") != null )
					ThrottleInfo.Remaining = int.Parse(throttle.Attributes.GetNamedItem("remaining").Value);
			}
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:25,代码来源:Groups.cs

示例8: FromXml

        public void FromXml(XmlNode node)
        {
            Id = Dml.Attribute(node, "Id", "");
            Name = Dml.Attribute(node, "Name", "");
            Text = Dml.Attribute(node, "Text", "");
            LibId = Dml.Attribute(node, "LibId", "");

            XmlNode temp = node.SelectSingleNode("Resource/Config");
            if (temp != null)
            {
                ConnectionString = temp.InnerText;
            }
            temp = node.SelectSingleNode("Resource/Uri");
            if (temp != null)
            {
                Uri = temp.InnerText;
            }
            temp = node.SelectSingleNode("Resource/User");
            if (temp != null)
            {
                User = temp.InnerText;
            }
            temp = node.SelectSingleNode("Resource/Password");
            if (temp != null)
            {
                Password = temp.InnerText;
            }
        }
开发者ID:burstas,项目名称:rmps,代码行数:28,代码来源:Rdbms.cs

示例9: RateCouponCalculation

 public RateCouponCalculation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 XsdTypeToken ob = new XsdTypeToken(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new XsdTypeToken(typeNode);
             }
         }
         else
         {
             type_ = new XsdTypeToken(typeNode);
         }
     }
     
 
     XmlNode fixedRateCouponCalculationNode = xmlNode.SelectSingleNode("fixedRateCouponCalculation");
     
     if (fixedRateCouponCalculationNode != null)
     {
         if (fixedRateCouponCalculationNode.Attributes["href"] != null || fixedRateCouponCalculationNode.Attributes["id"] != null) 
         {
             if (fixedRateCouponCalculationNode.Attributes["id"] != null) 
             {
                 fixedRateCouponCalculationIDRef_ = fixedRateCouponCalculationNode.Attributes["id"].Value;
                 FixedRateCouponCalculation ob = new FixedRateCouponCalculation(fixedRateCouponCalculationNode);
                 IDManager.SetID(fixedRateCouponCalculationIDRef_, ob);
             }
             else if (fixedRateCouponCalculationNode.Attributes["href"] != null)
             {
                 fixedRateCouponCalculationIDRef_ = fixedRateCouponCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRateCouponCalculation_ = new FixedRateCouponCalculation(fixedRateCouponCalculationNode);
             }
         }
         else
         {
             fixedRateCouponCalculation_ = new FixedRateCouponCalculation(fixedRateCouponCalculationNode);
         }
     }
     
 
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:60,代码来源:RateCouponCalculation.cs

示例10: CompileModelsFromScene

        public IList<XmlNode> CompileModelsFromScene( XmlNode xmlNode )
        {
            IList< XmlNode > models = new List<XmlNode>( );

            var entitiesNode = xmlNode.SelectSingleNode( "/scene/nodes" );

            if ( entitiesNode != null )
            {
                foreach ( XmlNode entity in entitiesNode.ChildNodes )
                {
                    var userDataNode = xmlNode.SelectSingleNode( ".//userData" );

                    if( userDataNode != null )
                    {
                        userDataNode.ParentNode.RemoveChild( userDataNode );
                    }

                    var modelFile = new XmlDocument( );
                    var modelNode = modelFile.ImportNode( entity, true );
                    modelFile.AppendChild( modelNode );

                    models.Add( modelFile );
                }
            }

            return models;
        }
开发者ID:nkostelnik,项目名称:factions_editor,代码行数:27,代码来源:ModelCompiler.cs

示例11: YieldCurve

 public YieldCurve(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode algorithmNode = xmlNode.SelectSingleNode("algorithm");
     
     if (algorithmNode != null)
     {
         if (algorithmNode.Attributes["href"] != null || algorithmNode.Attributes["id"] != null) 
         {
             if (algorithmNode.Attributes["id"] != null) 
             {
                 algorithmIDRef_ = algorithmNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(algorithmNode);
                 IDManager.SetID(algorithmIDRef_, ob);
             }
             else if (algorithmNode.Attributes["href"] != null)
             {
                 algorithmIDRef_ = algorithmNode.Attributes["href"].Value;
             }
             else
             {
                 algorithm_ = new XsdTypeString(algorithmNode);
             }
         }
         else
         {
             algorithm_ = new XsdTypeString(algorithmNode);
         }
     }
     
 
     XmlNode forecastRateIndexNode = xmlNode.SelectSingleNode("forecastRateIndex");
     
     if (forecastRateIndexNode != null)
     {
         if (forecastRateIndexNode.Attributes["href"] != null || forecastRateIndexNode.Attributes["id"] != null) 
         {
             if (forecastRateIndexNode.Attributes["id"] != null) 
             {
                 forecastRateIndexIDRef_ = forecastRateIndexNode.Attributes["id"].Value;
                 ForecastRateIndex ob = new ForecastRateIndex(forecastRateIndexNode);
                 IDManager.SetID(forecastRateIndexIDRef_, ob);
             }
             else if (forecastRateIndexNode.Attributes["href"] != null)
             {
                 forecastRateIndexIDRef_ = forecastRateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 forecastRateIndex_ = new ForecastRateIndex(forecastRateIndexNode);
             }
         }
         else
         {
             forecastRateIndex_ = new ForecastRateIndex(forecastRateIndexNode);
         }
     }
     
 
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:60,代码来源:YieldCurve.cs

示例12: IndexChange

 public IndexChange(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode indexFactorNode = xmlNode.SelectSingleNode("indexFactor");
     
     if (indexFactorNode != null)
     {
         if (indexFactorNode.Attributes["href"] != null || indexFactorNode.Attributes["id"] != null) 
         {
             if (indexFactorNode.Attributes["id"] != null) 
             {
                 indexFactorIDRef_ = indexFactorNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(indexFactorNode);
                 IDManager.SetID(indexFactorIDRef_, ob);
             }
             else if (indexFactorNode.Attributes["href"] != null)
             {
                 indexFactorIDRef_ = indexFactorNode.Attributes["href"].Value;
             }
             else
             {
                 indexFactor_ = new XsdTypeDecimal(indexFactorNode);
             }
         }
         else
         {
             indexFactor_ = new XsdTypeDecimal(indexFactorNode);
         }
     }
     
 
     XmlNode factoredCalculationAmountNode = xmlNode.SelectSingleNode("factoredCalculationAmount");
     
     if (factoredCalculationAmountNode != null)
     {
         if (factoredCalculationAmountNode.Attributes["href"] != null || factoredCalculationAmountNode.Attributes["id"] != null) 
         {
             if (factoredCalculationAmountNode.Attributes["id"] != null) 
             {
                 factoredCalculationAmountIDRef_ = factoredCalculationAmountNode.Attributes["id"].Value;
                 Money ob = new Money(factoredCalculationAmountNode);
                 IDManager.SetID(factoredCalculationAmountIDRef_, ob);
             }
             else if (factoredCalculationAmountNode.Attributes["href"] != null)
             {
                 factoredCalculationAmountIDRef_ = factoredCalculationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 factoredCalculationAmount_ = new Money(factoredCalculationAmountNode);
             }
         }
         else
         {
             factoredCalculationAmount_ = new Money(factoredCalculationAmountNode);
         }
     }
     
 
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:60,代码来源:IndexChange.cs

示例13: FxRateAsset

 public FxRateAsset(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode rateSourceNode = xmlNode.SelectSingleNode("rateSource");
     
     if (rateSourceNode != null)
     {
         if (rateSourceNode.Attributes["href"] != null || rateSourceNode.Attributes["id"] != null) 
         {
             if (rateSourceNode.Attributes["id"] != null) 
             {
                 rateSourceIDRef_ = rateSourceNode.Attributes["id"].Value;
                 FxSpotRateSource ob = new FxSpotRateSource(rateSourceNode);
                 IDManager.SetID(rateSourceIDRef_, ob);
             }
             else if (rateSourceNode.Attributes["href"] != null)
             {
                 rateSourceIDRef_ = rateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 rateSource_ = new FxSpotRateSource(rateSourceNode);
             }
         }
         else
         {
             rateSource_ = new FxSpotRateSource(rateSourceNode);
         }
     }
     
 
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:60,代码来源:FxRateAsset.cs

示例14: ReportIdentification

 public ReportIdentification(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode numberOfSectionsNode = xmlNode.SelectSingleNode("numberOfSections");
     
     if (numberOfSectionsNode != null)
     {
         if (numberOfSectionsNode.Attributes["href"] != null || numberOfSectionsNode.Attributes["id"] != null) 
         {
             if (numberOfSectionsNode.Attributes["id"] != null) 
             {
                 numberOfSectionsIDRef_ = numberOfSectionsNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(numberOfSectionsNode);
                 IDManager.SetID(numberOfSectionsIDRef_, ob);
             }
             else if (numberOfSectionsNode.Attributes["href"] != null)
             {
                 numberOfSectionsIDRef_ = numberOfSectionsNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfSections_ = new XsdTypePositiveInteger(numberOfSectionsNode);
             }
         }
         else
         {
             numberOfSections_ = new XsdTypePositiveInteger(numberOfSectionsNode);
         }
     }
     
 
     XmlNode submissionsCompleteNode = xmlNode.SelectSingleNode("submissionsComplete");
     
     if (submissionsCompleteNode != null)
     {
         if (submissionsCompleteNode.Attributes["href"] != null || submissionsCompleteNode.Attributes["id"] != null) 
         {
             if (submissionsCompleteNode.Attributes["id"] != null) 
             {
                 submissionsCompleteIDRef_ = submissionsCompleteNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(submissionsCompleteNode);
                 IDManager.SetID(submissionsCompleteIDRef_, ob);
             }
             else if (submissionsCompleteNode.Attributes["href"] != null)
             {
                 submissionsCompleteIDRef_ = submissionsCompleteNode.Attributes["href"].Value;
             }
             else
             {
                 submissionsComplete_ = new XsdTypeBoolean(submissionsCompleteNode);
             }
         }
         else
         {
             submissionsComplete_ = new XsdTypeBoolean(submissionsCompleteNode);
         }
     }
     
 
 }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:60,代码来源:ReportIdentification.cs

示例15: Protocol

        public Protocol(SystemDescription parent, XmlNode xml, XmlNamespaceManager nsm)
            : this(parent)
        {
            if (xml == null)
                throw new ArgumentNullException();
            if (nsm == null)
                throw new ArgumentNullException();

            XmlAttribute attr = xml.SelectSingleNode("@name", nsm) as XmlAttribute;
            if (attr != null)
                this.Name = attr.Value;
            attr = xml.SelectSingleNode("@docId", nsm) as XmlAttribute;
            if (attr != null)
                this.DocumentationId = attr.Value;
            attr = xml.SelectSingleNode("@abstract", nsm) as XmlAttribute;
            if (attr != null)
                this.IsAbstract = Boolean.Parse(attr.Value);

            foreach (XmlAttribute node in xml.SelectNodes("sd:ConformsTo/@protocol", nsm))
                this.ConformsTo.Add(node.Value);
            foreach (XmlElement node in xml.SelectNodes("sd:Description", nsm))
                this.Description = new HtmlString(node);
            foreach (XmlElement node in xml.SelectNodes("sd:StandardGlobal", nsm))
                this.StandardGlobals.Add(new Global(this, node, nsm));
            foreach (XmlElement node in xml.SelectNodes("sd:Message", nsm))
                this.Messages.Add(new Message(this, node, nsm));
        }
开发者ID:erlis,项目名称:IronSmalltalk,代码行数:27,代码来源:Protocol.cs


注:本文中的System.Xml.XmlNode.SelectSingleNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。