Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebControls / XmlHierarchicalDataSourceView.cs / 1 / XmlHierarchicalDataSourceView.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing.Design; using System.Security.Permissions; using System.Text; using System.Web; using System.Web.UI; using System.Web.Util; using System.Xml; ////// Represents a hierarchical view of an XmlDataSource. /// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class XmlHierarchicalDataSourceView : HierarchicalDataSourceView { private XmlDataSource _owner; private string _viewPath; ////// Creates a new instance of XmlHierarchicalDataSourceView. /// internal XmlHierarchicalDataSourceView(XmlDataSource owner, string viewPath) { Debug.Assert(owner != null); _owner = owner; _viewPath = viewPath; } public override IHierarchicalEnumerable Select() { XmlNode root = _owner.GetXmlDocument(); XmlNodeList nodes = null; if (!String.IsNullOrEmpty(_viewPath)) { XmlNode node = root.SelectSingleNode(_viewPath); if (node != null) { nodes = node.ChildNodes; } } else { if (_owner.XPath.Length > 0) { nodes = root.SelectNodes(_owner.XPath); } else { nodes = root.ChildNodes; } } return new XmlHierarchicalEnumerable(nodes); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing.Design; using System.Security.Permissions; using System.Text; using System.Web; using System.Web.UI; using System.Web.Util; using System.Xml; ////// Represents a hierarchical view of an XmlDataSource. /// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class XmlHierarchicalDataSourceView : HierarchicalDataSourceView { private XmlDataSource _owner; private string _viewPath; ////// Creates a new instance of XmlHierarchicalDataSourceView. /// internal XmlHierarchicalDataSourceView(XmlDataSource owner, string viewPath) { Debug.Assert(owner != null); _owner = owner; _viewPath = viewPath; } public override IHierarchicalEnumerable Select() { XmlNode root = _owner.GetXmlDocument(); XmlNodeList nodes = null; if (!String.IsNullOrEmpty(_viewPath)) { XmlNode node = root.SelectSingleNode(_viewPath); if (node != null) { nodes = node.ChildNodes; } } else { if (_owner.XPath.Length > 0) { nodes = root.SelectNodes(_owner.XPath); } else { nodes = root.ChildNodes; } } return new XmlHierarchicalEnumerable(nodes); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PageThemeParser.cs
- TextDpi.cs
- GeometryHitTestParameters.cs
- KnownColorTable.cs
- CopyEncoder.cs
- ProvidersHelper.cs
- Floater.cs
- InvalidEnumArgumentException.cs
- XmlSchemaAttributeGroup.cs
- OrderedEnumerableRowCollection.cs
- TripleDES.cs
- SiteMapNodeItem.cs
- XmlSchemaAnnotated.cs
- IndentedTextWriter.cs
- ScriptingJsonSerializationSection.cs
- StringSorter.cs
- PropertySegmentSerializationProvider.cs
- DriveInfo.cs
- HttpClientCertificate.cs
- MSAAEventDispatcher.cs
- RsaSecurityToken.cs
- MouseBinding.cs
- DataBoundLiteralControl.cs
- ClientTarget.cs
- Binding.cs
- ToolTipAutomationPeer.cs
- PropertyInfoSet.cs
- AspNetPartialTrustHelpers.cs
- Action.cs
- SmtpClient.cs
- CodeLinePragma.cs
- UserNamePasswordValidator.cs
- SelectionRangeConverter.cs
- ExceptionAggregator.cs
- ThaiBuddhistCalendar.cs
- ServerValidateEventArgs.cs
- CodeParameterDeclarationExpressionCollection.cs
- VectorCollectionConverter.cs
- TryCatchDesigner.xaml.cs
- ZoneLinkButton.cs
- RegexMatchCollection.cs
- cache.cs
- OracleColumn.cs
- XNameConverter.cs
- ReferenceEqualityComparer.cs
- Int32Storage.cs
- Stacktrace.cs
- WindowClosedEventArgs.cs
- PixelFormats.cs
- HashRepartitionEnumerator.cs
- HtmlTernaryTree.cs
- TraceHandler.cs
- Win32PrintDialog.cs
- ReadOnlyHierarchicalDataSource.cs
- DiscoveryProxy.cs
- RadioButton.cs
- XamlInt32CollectionSerializer.cs
- ServiceModelConfiguration.cs
- EntityExpressionVisitor.cs
- ClickablePoint.cs
- DragDeltaEventArgs.cs
- ApplicationHost.cs
- FusionWrap.cs
- AjaxFrameworkAssemblyAttribute.cs
- WhiteSpaceTrimStringConverter.cs
- ReadOnlyNameValueCollection.cs
- ProofTokenCryptoHandle.cs
- GridViewRow.cs
- JoinElimination.cs
- WindowsFormsSectionHandler.cs
- CollectionViewProxy.cs
- CreateRefExpr.cs
- CollectionTraceRecord.cs
- ProfileManager.cs
- BamlResourceContent.cs
- nulltextcontainer.cs
- RelationshipDetailsRow.cs
- TimeSpanMinutesConverter.cs
- CodeDirectoryCompiler.cs
- SecureUICommand.cs
- BooleanAnimationUsingKeyFrames.cs
- PrinterUnitConvert.cs
- EdmType.cs
- AssemblyAttributes.cs
- ParseChildrenAsPropertiesAttribute.cs
- DesignerTransaction.cs
- XmlSchemaComplexContentRestriction.cs
- SqlClientMetaDataCollectionNames.cs
- MenuCommands.cs
- dbdatarecord.cs
- WebPartManager.cs
- SamlAuthorizationDecisionStatement.cs
- EventMetadata.cs
- PipeException.cs
- ContextQuery.cs
- InternalBase.cs
- TaiwanLunisolarCalendar.cs
- GraphicsPath.cs
- WebPartVerb.cs
- CacheOutputQuery.cs