Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SegmentInfo.cs
- LeafCellTreeNode.cs
- InternalDispatchObject.cs
- PerformanceCounterPermissionAttribute.cs
- AccessibleObject.cs
- SoapAttributeAttribute.cs
- NotifyCollectionChangedEventArgs.cs
- IArgumentProvider.cs
- AddInSegmentDirectoryNotFoundException.cs
- EventLogConfiguration.cs
- ArrangedElement.cs
- TableLayoutPanelBehavior.cs
- FrameworkTemplate.cs
- OdbcPermission.cs
- PeoplePickerWrapper.cs
- StreamWriter.cs
- processwaithandle.cs
- System.Data_BID.cs
- XmlAnyAttributeAttribute.cs
- NamespaceList.cs
- Overlapped.cs
- PaintEvent.cs
- NativeMethods.cs
- CreateUserWizardStep.cs
- BindingValueChangedEventArgs.cs
- FormViewUpdatedEventArgs.cs
- TextBoxLine.cs
- DeploymentSection.cs
- ConfigurationLockCollection.cs
- ClientTargetCollection.cs
- PackageFilter.cs
- PKCS1MaskGenerationMethod.cs
- ProjectionCamera.cs
- Int32RectValueSerializer.cs
- TextProperties.cs
- IndexedString.cs
- TrustManagerMoreInformation.cs
- SoapFault.cs
- RuntimeHandles.cs
- VarRemapper.cs
- ComponentChangingEvent.cs
- CommandEventArgs.cs
- KeyTime.cs
- ProjectionCamera.cs
- Internal.cs
- FieldTemplateUserControl.cs
- LogRestartAreaEnumerator.cs
- SignatureToken.cs
- OraclePermission.cs
- SerialErrors.cs
- SelectedDatesCollection.cs
- CompiledWorkflowDefinitionContext.cs
- HtmlLinkAdapter.cs
- StretchValidation.cs
- DescendentsWalkerBase.cs
- BaseParagraph.cs
- DefaultWorkflowSchedulerService.cs
- CustomCategoryAttribute.cs
- XmlTextReaderImpl.cs
- XmlEventCache.cs
- StrokeDescriptor.cs
- ZoomPercentageConverter.cs
- ImmutableCollection.cs
- WindowsFormsSynchronizationContext.cs
- DependsOnAttribute.cs
- SoapSchemaImporter.cs
- Context.cs
- LinkLabelLinkClickedEvent.cs
- BufferCache.cs
- WindowsFormsLinkLabel.cs
- NativeMethods.cs
- MachineKeyConverter.cs
- CodeEventReferenceExpression.cs
- ValueTypeFixupInfo.cs
- InvalidComObjectException.cs
- NestedContainer.cs
- InvariantComparer.cs
- QilCloneVisitor.cs
- FileDialogPermission.cs
- XmlJsonWriter.cs
- RuntimeConfig.cs
- UserControlDesigner.cs
- MarkerProperties.cs
- IndexedGlyphRun.cs
- URLMembershipCondition.cs
- Transactions.cs
- RootBuilder.cs
- ExitEventArgs.cs
- UnsafeNativeMethods.cs
- RefExpr.cs
- invalidudtexception.cs
- SurrogateEncoder.cs
- SocketInformation.cs
- XmlMapping.cs
- NonBatchDirectoryCompiler.cs
- Cell.cs
- DataSourceCacheDurationConverter.cs
- ToolCreatedEventArgs.cs
- GeneratedCodeAttribute.cs
- GeometryValueSerializer.cs