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
- ObjectPersistData.cs
- DataList.cs
- TransformerInfoCollection.cs
- AnnotationResourceCollection.cs
- UserControl.cs
- ListMarkerLine.cs
- HtmlString.cs
- SoapFault.cs
- GroupBox.cs
- ScrollViewerAutomationPeer.cs
- TypeNameParser.cs
- URLAttribute.cs
- Brush.cs
- DesignerSelectionListAdapter.cs
- DependencyObjectCodeDomSerializer.cs
- TypeSystem.cs
- EmptyElement.cs
- BufferedReadStream.cs
- RepeatButton.cs
- GridViewEditEventArgs.cs
- DriveNotFoundException.cs
- CodeExpressionStatement.cs
- OleDbFactory.cs
- HttpListener.cs
- DiagnosticsConfiguration.cs
- File.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- SubclassTypeValidatorAttribute.cs
- HttpCacheVaryByContentEncodings.cs
- WebHeaderCollection.cs
- XmlAnyAttributeAttribute.cs
- MsmqQueue.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- XmlSchemaSimpleType.cs
- TextUtf8RawTextWriter.cs
- AnimationException.cs
- SqlRewriteScalarSubqueries.cs
- SecurityTokenSerializer.cs
- UrlPropertyAttribute.cs
- TrackingServices.cs
- PtsHost.cs
- WorkflowLayouts.cs
- DockEditor.cs
- Types.cs
- MasterPageParser.cs
- TabControlCancelEvent.cs
- DocumentReference.cs
- StrokeNodeEnumerator.cs
- QueryStatement.cs
- CheckBoxBaseAdapter.cs
- PasswordPropertyTextAttribute.cs
- Vector3D.cs
- WebResourceAttribute.cs
- PlanCompiler.cs
- EntityProviderServices.cs
- EntityDataSourceConfigureObjectContext.cs
- ListControlConvertEventArgs.cs
- MethodBody.cs
- BitmapEffectState.cs
- EncryptedPackageFilter.cs
- XmlElementCollection.cs
- CodeTypeParameter.cs
- CompositeKey.cs
- ContractReference.cs
- NotImplementedException.cs
- DefaultWorkflowSchedulerService.cs
- ComEventsHelper.cs
- DecoderFallbackWithFailureFlag.cs
- SetterBaseCollection.cs
- XmlDigitalSignatureProcessor.cs
- RectangleHotSpot.cs
- PenLineCapValidation.cs
- DbConnectionClosed.cs
- ProxyWebPartManagerDesigner.cs
- DefaultMemberAttribute.cs
- DataColumnMapping.cs
- WebPartVerbCollection.cs
- XmlSchemaException.cs
- ProgressBar.cs
- sqlmetadatafactory.cs
- ListControl.cs
- SmtpClient.cs
- RuntimeConfigLKG.cs
- ClientViaElement.cs
- QueryCursorEventArgs.cs
- QilValidationVisitor.cs
- IItemContainerGenerator.cs
- InvokeMethodActivityDesigner.cs
- BevelBitmapEffect.cs
- Win32Native.cs
- assertwrapper.cs
- DrawingContextFlattener.cs
- ZipPackage.cs
- ContextMenuStripActionList.cs
- DefaultAuthorizationContext.cs
- DiffuseMaterial.cs
- QuaternionAnimation.cs
- ValidationResult.cs
- ObjectListCommandCollection.cs
- DeleteHelper.cs