Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HtmlHead.cs
- TextFormatterHost.cs
- FontSourceCollection.cs
- MachinePropertyVariants.cs
- ProcessHostMapPath.cs
- CodeArrayCreateExpression.cs
- CodeNamespaceCollection.cs
- Canvas.cs
- CodeAccessPermission.cs
- TypeResolvingOptions.cs
- Point3DCollection.cs
- EntityDataSourceState.cs
- ButtonBase.cs
- BitmapEffectInputConnector.cs
- SqlGenerator.cs
- XDRSchema.cs
- ResourceDescriptionAttribute.cs
- HttpResponse.cs
- QilTypeChecker.cs
- ProvidersHelper.cs
- LinkedResource.cs
- WebDisplayNameAttribute.cs
- UIElementParagraph.cs
- AffineTransform3D.cs
- StackSpiller.Generated.cs
- XmlSchemaCollection.cs
- ProfileSettingsCollection.cs
- RoutedCommand.cs
- Renderer.cs
- InvalidTimeZoneException.cs
- CorrelationResolver.cs
- FloatUtil.cs
- OleDbWrapper.cs
- XmlAtomicValue.cs
- BinaryCommonClasses.cs
- InstancePersistenceContext.cs
- EraserBehavior.cs
- RewritingProcessor.cs
- IDispatchConstantAttribute.cs
- PageContentAsyncResult.cs
- NonBatchDirectoryCompiler.cs
- ConstructorNeedsTagAttribute.cs
- BrowsableAttribute.cs
- CompareValidator.cs
- DelimitedListTraceListener.cs
- DesignSurfaceManager.cs
- safelink.cs
- CellCreator.cs
- ToolTipAutomationPeer.cs
- ParameterCollectionEditor.cs
- Header.cs
- OdbcConnection.cs
- HttpDebugHandler.cs
- ResourceDescriptionAttribute.cs
- SectionInformation.cs
- BulletedList.cs
- SimpleWebHandlerParser.cs
- FormsAuthenticationUser.cs
- ExtensionWindowHeader.cs
- DiscoveryRequestHandler.cs
- DbConnectionPoolCounters.cs
- PropertyNames.cs
- TreeBuilderXamlTranslator.cs
- DataSource.cs
- BooleanAnimationBase.cs
- DataServiceRequest.cs
- BufferModeSettings.cs
- PolicyManager.cs
- ImageDrawing.cs
- LeafCellTreeNode.cs
- CompleteWizardStep.cs
- ControlEvent.cs
- Header.cs
- OpCodes.cs
- XmlExpressionDumper.cs
- CompiledIdentityConstraint.cs
- Ipv6Element.cs
- Point3DAnimation.cs
- UnsafeNativeMethods.cs
- StickyNoteContentControl.cs
- MultiTrigger.cs
- ImportCatalogPart.cs
- GlyphInfoList.cs
- URLAttribute.cs
- _SpnDictionary.cs
- PerformanceCountersElement.cs
- ActivityBindForm.Designer.cs
- ProviderException.cs
- InputLanguageManager.cs
- DefaultPrintController.cs
- CodeTypeParameterCollection.cs
- messageonlyhwndwrapper.cs
- File.cs
- EDesignUtil.cs
- ModifierKeysValueSerializer.cs
- TreeViewImageKeyConverter.cs
- QuaternionAnimationBase.cs
- GB18030Encoding.cs
- Model3D.cs
- GridViewColumn.cs