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
- GlyphRunDrawing.cs
- QuaternionAnimationBase.cs
- CopyAction.cs
- PaperSize.cs
- SiteMap.cs
- DisposableCollectionWrapper.cs
- KeySplineConverter.cs
- ProviderMetadataCachedInformation.cs
- SqlDataSourceView.cs
- MetadataArtifactLoaderComposite.cs
- WindowsScrollBarBits.cs
- HtmlCalendarAdapter.cs
- Win32.cs
- TabControlCancelEvent.cs
- ReadContentAsBinaryHelper.cs
- ElementsClipboardData.cs
- EntryWrittenEventArgs.cs
- StructuralCache.cs
- UnitControl.cs
- InputElement.cs
- XmlElement.cs
- CompilationUnit.cs
- BitmapEffectGroup.cs
- WsrmMessageInfo.cs
- SourceFileBuildProvider.cs
- TableSectionStyle.cs
- Rect.cs
- DataObjectEventArgs.cs
- ContractComponent.cs
- WindowsIPAddress.cs
- SemanticResultKey.cs
- PersonalizationAdministration.cs
- sqlnorm.cs
- XmlExceptionHelper.cs
- BinaryReader.cs
- XmlNodeChangedEventArgs.cs
- GeneralTransform3D.cs
- CapabilitiesRule.cs
- ClientProxyGenerator.cs
- SiteMapSection.cs
- CounterSetInstance.cs
- ListBoxItem.cs
- GradientStop.cs
- SoapServerMethod.cs
- CryptoConfig.cs
- AttributeQuery.cs
- SourceFileBuildProvider.cs
- CompModSwitches.cs
- OrderedDictionary.cs
- RuntimeHelpers.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ExceptionAggregator.cs
- ColumnReorderedEventArgs.cs
- DotAtomReader.cs
- MessageHeader.cs
- PreviewPageInfo.cs
- DataGridDetailsPresenter.cs
- CheckableControlBaseAdapter.cs
- OracleSqlParser.cs
- Translator.cs
- FileDialogPermission.cs
- VisualStyleRenderer.cs
- TextEditor.cs
- ErrorFormatterPage.cs
- UIEndRequest.cs
- HttpApplication.cs
- ADConnectionHelper.cs
- CommunicationObjectFaultedException.cs
- SchemaObjectWriter.cs
- ConditionChanges.cs
- BulletedListEventArgs.cs
- Simplifier.cs
- CommandManager.cs
- PriorityBindingExpression.cs
- RuntimeTransactionHandle.cs
- MDIWindowDialog.cs
- DesignerImageAdapter.cs
- WorkflowRuntimeSection.cs
- IntegerValidator.cs
- UriTemplateVariableQueryValue.cs
- BuildProviderUtils.cs
- HiddenFieldPageStatePersister.cs
- HttpApplicationStateBase.cs
- CodeExporter.cs
- StreamGeometryContext.cs
- PinnedBufferMemoryStream.cs
- MasterPageCodeDomTreeGenerator.cs
- AssemblySettingAttributes.cs
- XmlStreamedByteStreamReader.cs
- TemplatePropertyEntry.cs
- ToolStripDropTargetManager.cs
- Point3DConverter.cs
- GlyphingCache.cs
- HandlerWithFactory.cs
- UnsafeNetInfoNativeMethods.cs
- WebPartDisplayModeCollection.cs
- ObjectKeyFrameCollection.cs
- PathSegmentCollection.cs
- HttpListenerResponse.cs
- WebAdminConfigurationHelper.cs