Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Xml / System / Xml / XPath / XPathExpr.cs / 1 / XPathExpr.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.XPath { using System; using System.Xml; using System.Collections; using MS.Internal.Xml.XPath; public enum XmlSortOrder { Ascending = 1, Descending = 2, } public enum XmlCaseOrder { None = 0, UpperFirst = 1, LowerFirst = 2, } public enum XmlDataType { Text = 1, Number = 2, } public enum XPathResultType { Number = 0 , String = 1, Boolean = 2, NodeSet = 3, Navigator = XPathResultType.String, Any = 5, Error }; public abstract class XPathExpression { internal XPathExpression(){} public abstract string Expression { get; } public abstract void AddSort(object expr, IComparer comparer); public abstract void AddSort(object expr, XmlSortOrder order, XmlCaseOrder caseOrder, string lang, XmlDataType dataType); public abstract XPathExpression Clone(); public abstract void SetContext(XmlNamespaceManager nsManager); public abstract void SetContext(IXmlNamespaceResolver nsResolver); public abstract XPathResultType ReturnType { get; } public static XPathExpression Compile(string xpath) { return Compile(xpath, /*nsResolver:*/null); } public static XPathExpression Compile(string xpath, IXmlNamespaceResolver nsResolver) { bool hasPrefix; Query query = new QueryBuilder().Build(xpath, out hasPrefix); CompiledXpathExpr expr = new CompiledXpathExpr(query, xpath, hasPrefix); if (null != nsResolver) { XmlNamespaceManager mngr = XPathNavigator.GetNamespaces(nsResolver); expr.SetContext(mngr); } return expr; } private void PrintQuery(XmlWriter w) { ((CompiledXpathExpr)this).QueryTree.PrintQuery(w); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.XPath { using System; using System.Xml; using System.Collections; using MS.Internal.Xml.XPath; public enum XmlSortOrder { Ascending = 1, Descending = 2, } public enum XmlCaseOrder { None = 0, UpperFirst = 1, LowerFirst = 2, } public enum XmlDataType { Text = 1, Number = 2, } public enum XPathResultType { Number = 0 , String = 1, Boolean = 2, NodeSet = 3, Navigator = XPathResultType.String, Any = 5, Error }; public abstract class XPathExpression { internal XPathExpression(){} public abstract string Expression { get; } public abstract void AddSort(object expr, IComparer comparer); public abstract void AddSort(object expr, XmlSortOrder order, XmlCaseOrder caseOrder, string lang, XmlDataType dataType); public abstract XPathExpression Clone(); public abstract void SetContext(XmlNamespaceManager nsManager); public abstract void SetContext(IXmlNamespaceResolver nsResolver); public abstract XPathResultType ReturnType { get; } public static XPathExpression Compile(string xpath) { return Compile(xpath, /*nsResolver:*/null); } public static XPathExpression Compile(string xpath, IXmlNamespaceResolver nsResolver) { bool hasPrefix; Query query = new QueryBuilder().Build(xpath, out hasPrefix); CompiledXpathExpr expr = new CompiledXpathExpr(query, xpath, hasPrefix); if (null != nsResolver) { XmlNamespaceManager mngr = XPathNavigator.GetNamespaces(nsResolver); expr.SetContext(mngr); } return expr; } private void PrintQuery(XmlWriter w) { ((CompiledXpathExpr)this).QueryTree.PrintQuery(w); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PackageFilter.cs
- ContainerFilterService.cs
- ContentPresenter.cs
- DetailsViewModeEventArgs.cs
- Vector3dCollection.cs
- EmptyControlCollection.cs
- TextTreeTextBlock.cs
- GeometryHitTestResult.cs
- GenericWebPart.cs
- BitArray.cs
- CryptoStream.cs
- SafeSecurityHelper.cs
- CompositeFontFamily.cs
- OdbcEnvironment.cs
- Registration.cs
- RuleProcessor.cs
- HijriCalendar.cs
- EmbeddedMailObject.cs
- SynchronizationContext.cs
- DiscoveryMessageSequence11.cs
- DateTimeUtil.cs
- httpapplicationstate.cs
- RelationshipWrapper.cs
- IndexExpression.cs
- VisualStyleElement.cs
- TemplateBuilder.cs
- ApplicationManager.cs
- Transform3DGroup.cs
- PropertyRef.cs
- HwndSourceParameters.cs
- WebServiceParameterData.cs
- Symbol.cs
- CodeDefaultValueExpression.cs
- ContentValidator.cs
- IChannel.cs
- CompilerScopeManager.cs
- FlowLayoutPanel.cs
- AnnotationMap.cs
- MtomMessageEncodingBindingElement.cs
- shaperfactory.cs
- SimpleBitVector32.cs
- PageContentAsyncResult.cs
- PrintDialog.cs
- PropertyCondition.cs
- Journal.cs
- BamlLocalizer.cs
- FontSource.cs
- LineGeometry.cs
- XsltInput.cs
- DataGridItem.cs
- SendSecurityHeader.cs
- DefaultMergeHelper.cs
- DataGridViewCheckBoxColumn.cs
- AutomationPatternInfo.cs
- LongAverageAggregationOperator.cs
- SetterBase.cs
- ImageCodecInfo.cs
- RequestCache.cs
- AutomationEvent.cs
- serverconfig.cs
- SamlSecurityTokenAuthenticator.cs
- Bits.cs
- CacheHelper.cs
- SEHException.cs
- FixedStringLookup.cs
- SystemGatewayIPAddressInformation.cs
- ControlCommandSet.cs
- StateMachineSubscription.cs
- PropertyChangeTracker.cs
- SystemIPInterfaceProperties.cs
- DataControlButton.cs
- SQLGuidStorage.cs
- GroupQuery.cs
- RangeEnumerable.cs
- Token.cs
- TraceHandler.cs
- RuleInfoComparer.cs
- CancelEventArgs.cs
- DataSourceControlBuilder.cs
- RoleServiceManager.cs
- CompoundFileReference.cs
- DataRowCollection.cs
- SapiAttributeParser.cs
- GeneralTransformGroup.cs
- DbModificationClause.cs
- ACL.cs
- FrameworkContentElement.cs
- COM2PictureConverter.cs
- Rect.cs
- CodeCatchClauseCollection.cs
- BadImageFormatException.cs
- ServiceChannelFactory.cs
- State.cs
- CodeExpressionStatement.cs
- SrgsDocument.cs
- CustomWebEventKey.cs
- TimeStampChecker.cs
- PropertyPushdownHelper.cs
- wgx_commands.cs
- _SslStream.cs