Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- JapaneseLunisolarCalendar.cs
- MDIClient.cs
- TextDecoration.cs
- MailMessage.cs
- ReadOnlyDictionary.cs
- WebRequest.cs
- SQLDateTimeStorage.cs
- SaveFileDialog.cs
- TextServicesCompartmentContext.cs
- BrowserCapabilitiesCompiler.cs
- PersonalizationState.cs
- sqlmetadatafactory.cs
- ListenerElementsCollection.cs
- HtmlWindow.cs
- HtmlButton.cs
- EditorPartChrome.cs
- RankException.cs
- WsatAdminException.cs
- SoapIncludeAttribute.cs
- UnmanagedMemoryStream.cs
- Misc.cs
- OrderPreservingPipeliningMergeHelper.cs
- WebPartTransformer.cs
- AssemblyInfo.cs
- ThreadPool.cs
- GeometryConverter.cs
- SafeArrayTypeMismatchException.cs
- CatalogZoneBase.cs
- X509Utils.cs
- VirtualizedItemProviderWrapper.cs
- MapPathBasedVirtualPathProvider.cs
- MarkupProperty.cs
- ToolStripGripRenderEventArgs.cs
- ContextMenuService.cs
- ListViewDeleteEventArgs.cs
- Sequence.cs
- UIElementIsland.cs
- DeviceContext.cs
- EntitySqlQueryCacheEntry.cs
- InvalidateEvent.cs
- Point.cs
- MimeMultiPart.cs
- AttachedPropertyBrowsableAttribute.cs
- precedingsibling.cs
- MetadataHelper.cs
- ScrollViewerAutomationPeer.cs
- ControlValuePropertyAttribute.cs
- GregorianCalendarHelper.cs
- Sql8ExpressionRewriter.cs
- Vector3D.cs
- ExpressionLexer.cs
- SecurityPolicySection.cs
- DesignerOptionService.cs
- mediaeventargs.cs
- DataBoundControlHelper.cs
- _StreamFramer.cs
- RequestResizeEvent.cs
- SerialStream.cs
- CompensatableSequenceActivity.cs
- URLString.cs
- HatchBrush.cs
- ICspAsymmetricAlgorithm.cs
- FixedSOMLineCollection.cs
- TextParagraphView.cs
- UpdateEventArgs.cs
- ImageClickEventArgs.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- NestPullup.cs
- JpegBitmapEncoder.cs
- TrackBarRenderer.cs
- Lookup.cs
- EntityDataSourceState.cs
- NumberFormatter.cs
- StringUtil.cs
- HighlightComponent.cs
- ToolboxCategory.cs
- WebBaseEventKeyComparer.cs
- ScriptingScriptResourceHandlerSection.cs
- TrackingMemoryStreamFactory.cs
- CellTreeNodeVisitors.cs
- RuleInfoComparer.cs
- SecUtil.cs
- RefreshPropertiesAttribute.cs
- VarRefManager.cs
- DataStorage.cs
- MSAANativeProvider.cs
- SerializationObjectManager.cs
- RemotingSurrogateSelector.cs
- HyperLinkColumn.cs
- PolicyException.cs
- SqlCaseSimplifier.cs
- TextDpi.cs
- ComEventsSink.cs
- IsolatedStorageFilePermission.cs
- SafeFileMapViewHandle.cs
- VirtualPathProvider.cs
- Char.cs
- WeakEventManager.cs
- Helper.cs
- RelationshipDetailsRow.cs