Code:
/ FX-1434 / FX-1434 / 1.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
- SectionRecord.cs
- RequestQueue.cs
- SmiEventSink_Default.cs
- unitconverter.cs
- XslException.cs
- SelectionGlyphBase.cs
- FastPropertyAccessor.cs
- InternalTransaction.cs
- ModelChangedEventArgsImpl.cs
- MeshGeometry3D.cs
- EmptyEnumerator.cs
- ArrayConverter.cs
- XomlCompilerParameters.cs
- ListenDesigner.cs
- UrlMappingCollection.cs
- CriticalFinalizerObject.cs
- TrackingDataItem.cs
- MediaElementAutomationPeer.cs
- MimeMapping.cs
- COM2ExtendedBrowsingHandler.cs
- TagPrefixCollection.cs
- XmlTextReaderImpl.cs
- LinkButton.cs
- ValidationRule.cs
- VerificationAttribute.cs
- TimeSpanHelper.cs
- DataTableReader.cs
- WhitespaceRule.cs
- DirectoryRedirect.cs
- validationstate.cs
- DocumentPageTextView.cs
- DataGridViewLayoutData.cs
- RequestBringIntoViewEventArgs.cs
- FileDialog.cs
- MarshalByRefObject.cs
- IgnorePropertiesAttribute.cs
- CompilerHelpers.cs
- SystemIPInterfaceProperties.cs
- CompleteWizardStep.cs
- PrivacyNoticeBindingElementImporter.cs
- PrintDialogException.cs
- FormsAuthenticationUser.cs
- CachedCompositeFamily.cs
- CodeExpressionCollection.cs
- ComboBoxRenderer.cs
- CurrentChangingEventArgs.cs
- StringValidatorAttribute.cs
- Int32CollectionValueSerializer.cs
- TranslateTransform.cs
- Stroke2.cs
- HttpCookie.cs
- EventLogEntry.cs
- PartialArray.cs
- NetworkStream.cs
- BatchStream.cs
- RawStylusInputCustomDataList.cs
- OutputCacheSection.cs
- CatalogZoneDesigner.cs
- TableRow.cs
- BaseValidatorDesigner.cs
- HttpWriter.cs
- DLinqDataModelProvider.cs
- EventDescriptor.cs
- DataRelationCollection.cs
- ServerValidateEventArgs.cs
- StorageMappingItemLoader.cs
- OperationContractGenerationContext.cs
- DataBoundControlHelper.cs
- XmlLanguageConverter.cs
- CipherData.cs
- EmptyStringExpandableObjectConverter.cs
- IteratorFilter.cs
- MimeObjectFactory.cs
- StringResourceManager.cs
- DataSourceCacheDurationConverter.cs
- RegexGroupCollection.cs
- FormsAuthentication.cs
- TrackPointCollection.cs
- IgnoreSection.cs
- ControlIdConverter.cs
- DataPagerCommandEventArgs.cs
- DataBindingValueUIHandler.cs
- DeviceContext2.cs
- Validator.cs
- SqlUtil.cs
- CollectionConverter.cs
- SiteMapNodeItemEventArgs.cs
- PropertyChangingEventArgs.cs
- UnsafeNativeMethods.cs
- DragDrop.cs
- FunctionImportElement.cs
- Operand.cs
- DataGridViewCellStyle.cs
- UniqueConstraint.cs
- DrawingAttributesDefaultValueFactory.cs
- Geometry.cs
- BulletDecorator.cs
- HandlerFactoryWrapper.cs
- Tablet.cs
- ColumnCollection.cs