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
- MimeFormatter.cs
- clipboard.cs
- WindowsNonControl.cs
- EncoderReplacementFallback.cs
- COAUTHIDENTITY.cs
- RoutedEventValueSerializer.cs
- AttributeData.cs
- BlockUIContainer.cs
- RandomDelaySendsAsyncResult.cs
- HtmlInputReset.cs
- CodeDomConfigurationHandler.cs
- MenuItemStyleCollection.cs
- DesignerValidatorAdapter.cs
- XmlIlTypeHelper.cs
- StringBuilder.cs
- CachedPathData.cs
- Rules.cs
- TextContainerChangeEventArgs.cs
- TextSpan.cs
- MSAANativeProvider.cs
- UndoManager.cs
- ByteAnimation.cs
- JsonReader.cs
- SmiEventSink.cs
- WorkflowApplicationCompletedEventArgs.cs
- WinFormsSpinner.cs
- OptimalTextSource.cs
- Gdiplus.cs
- GPPOINTF.cs
- KeyGesture.cs
- ApplicationInfo.cs
- LogicalExpr.cs
- FileDialogPermission.cs
- DataGridViewTextBoxColumn.cs
- Matrix3DConverter.cs
- FontFamily.cs
- TrackingProfileSerializer.cs
- GeometryHitTestParameters.cs
- LinkClickEvent.cs
- RowUpdatedEventArgs.cs
- SerialPort.cs
- DateTimeOffset.cs
- SmiEventSink_DeferedProcessing.cs
- DescendantQuery.cs
- QueryOperatorEnumerator.cs
- ChameleonKey.cs
- NativeMethods.cs
- DecoratedNameAttribute.cs
- DiagnosticsConfigurationHandler.cs
- FormsAuthenticationUserCollection.cs
- CapabilitiesRule.cs
- CodeFieldReferenceExpression.cs
- ToolZone.cs
- XmlBinaryWriter.cs
- XsdBuilder.cs
- WaitHandleCannotBeOpenedException.cs
- NegotiateStream.cs
- UnsafeNativeMethods.cs
- XComponentModel.cs
- HttpCapabilitiesBase.cs
- GridItemPattern.cs
- TypeConverterValueSerializer.cs
- XmlNodeList.cs
- XmlNamedNodeMap.cs
- DataGridViewCell.cs
- SimpleRecyclingCache.cs
- Identity.cs
- VirtualizingPanel.cs
- GridViewRowCollection.cs
- PriorityQueue.cs
- EntityContainerEntitySetDefiningQuery.cs
- CodeLabeledStatement.cs
- CellParagraph.cs
- IncrementalCompileAnalyzer.cs
- ContainsSearchOperator.cs
- PageMediaSize.cs
- SQLSingle.cs
- XpsFixedDocumentReaderWriter.cs
- TextSyndicationContentKindHelper.cs
- ModelUIElement3D.cs
- ObjectQueryState.cs
- ListSourceHelper.cs
- XmlAttributeAttribute.cs
- StrongNameKeyPair.cs
- Attribute.cs
- CallSiteOps.cs
- XmlRawWriterWrapper.cs
- RawMouseInputReport.cs
- InstalledFontCollection.cs
- COM2FontConverter.cs
- ProviderConnectionPointCollection.cs
- DelegateSerializationHolder.cs
- MetadataElement.cs
- MatrixUtil.cs
- ButtonChrome.cs
- MetafileEditor.cs
- OdbcHandle.cs
- TraceEventCache.cs
- HostedTcpTransportManager.cs
- StrongNameUtility.cs