Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TextOnlyOutput.cs / 1 / TextOnlyOutput.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.IO; using System.Xml; using System.Xml.XPath; using System.Text; using System.Collections; internal class TextOnlyOutput : RecordOutput { private Processor processor; private TextWriter writer; internal XsltOutput Output { get { return this.processor.Output; } } public TextWriter Writer { get { return this.writer; } } // // Constructor // internal TextOnlyOutput(Processor processor, Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } this.processor = processor; this.writer = new StreamWriter(stream, Output.Encoding); } internal TextOnlyOutput(Processor processor, TextWriter writer) { if (writer == null) { throw new ArgumentNullException("writer"); } this.processor = processor; this.writer = writer; } // // RecordOutput interface method implementation // public Processor.OutputResult RecordDone(RecordBuilder record) { BuilderInfo mainNode = record.MainNode; switch (mainNode.NodeType) { case XmlNodeType.Text: case XmlNodeType.Whitespace: case XmlNodeType.SignificantWhitespace: this.writer.Write(mainNode.Value); break; default: break; } record.Reset(); return Processor.OutputResult.Continue; } public void TheEnd() { this.writer.Flush(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Xsl.XsltOld { using Res = System.Xml.Utils.Res; using System; using System.IO; using System.Xml; using System.Xml.XPath; using System.Text; using System.Collections; internal class TextOnlyOutput : RecordOutput { private Processor processor; private TextWriter writer; internal XsltOutput Output { get { return this.processor.Output; } } public TextWriter Writer { get { return this.writer; } } // // Constructor // internal TextOnlyOutput(Processor processor, Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } this.processor = processor; this.writer = new StreamWriter(stream, Output.Encoding); } internal TextOnlyOutput(Processor processor, TextWriter writer) { if (writer == null) { throw new ArgumentNullException("writer"); } this.processor = processor; this.writer = writer; } // // RecordOutput interface method implementation // public Processor.OutputResult RecordDone(RecordBuilder record) { BuilderInfo mainNode = record.MainNode; switch (mainNode.NodeType) { case XmlNodeType.Text: case XmlNodeType.Whitespace: case XmlNodeType.SignificantWhitespace: this.writer.Write(mainNode.Value); break; default: break; } record.Reset(); return Processor.OutputResult.Continue; } public void TheEnd() { this.writer.Flush(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OAVariantLib.cs
- SizeAnimationBase.cs
- XhtmlTextWriter.cs
- SqlClientMetaDataCollectionNames.cs
- HttpHandlersSection.cs
- DataGridCellEditEndingEventArgs.cs
- UnaryExpression.cs
- FontStretch.cs
- PageWrapper.cs
- SafeCoTaskMem.cs
- TypeConverterHelper.cs
- CodePageEncoding.cs
- EntityContainerEntitySet.cs
- DataGridViewLinkColumn.cs
- TextTreeText.cs
- StructuralType.cs
- XmlJsonReader.cs
- Stack.cs
- StringStorage.cs
- X509AsymmetricSecurityKey.cs
- ThreadStateException.cs
- RequestCachePolicy.cs
- CategoryNameCollection.cs
- CodeStatement.cs
- XhtmlConformanceSection.cs
- CustomTrackingQuery.cs
- StateChangeEvent.cs
- MaskDescriptors.cs
- XmlQualifiedName.cs
- NameObjectCollectionBase.cs
- SafeFileMappingHandle.cs
- ParserContext.cs
- TextProperties.cs
- PagedDataSource.cs
- TypeSemantics.cs
- KeyMatchBuilder.cs
- UniqueIdentifierService.cs
- RadioButtonList.cs
- ColumnWidthChangingEvent.cs
- login.cs
- SqlDataSourceView.cs
- XPathNavigatorReader.cs
- LazyTextWriterCreator.cs
- InstanceDataCollectionCollection.cs
- BlockExpression.cs
- TranslateTransform3D.cs
- RightsManagementInformation.cs
- WorkflowMarkupSerializationProvider.cs
- QuaternionAnimation.cs
- Comparer.cs
- GetImportFileNameRequest.cs
- EventSinkHelperWriter.cs
- BinaryFormatterWriter.cs
- ListManagerBindingsCollection.cs
- Image.cs
- SiteMapPath.cs
- DBCommand.cs
- ColorConvertedBitmap.cs
- StructuralObject.cs
- GlyphingCache.cs
- TypeViewSchema.cs
- ColorAnimationBase.cs
- ConfigurationManagerInternalFactory.cs
- SystemBrushes.cs
- ListMarkerLine.cs
- WindowsSecurityToken.cs
- ConfigurationValue.cs
- dataobject.cs
- ContextMenuAutomationPeer.cs
- PermissionSetEnumerator.cs
- WebPartEditorCancelVerb.cs
- CheckoutException.cs
- Simplifier.cs
- RightsManagementErrorHandler.cs
- FixedSOMElement.cs
- DiffuseMaterial.cs
- AnonymousIdentificationSection.cs
- HtmlWindowCollection.cs
- PageOrientation.cs
- DataFormats.cs
- EastAsianLunisolarCalendar.cs
- GlyphTypeface.cs
- XmlSerializationWriter.cs
- TextBoxRenderer.cs
- PortCache.cs
- WebPartsPersonalizationAuthorization.cs
- RichTextBoxConstants.cs
- AssociationTypeEmitter.cs
- ListBindableAttribute.cs
- COAUTHIDENTITY.cs
- ReadOnlyAttribute.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ImageAnimator.cs
- MemoryPressure.cs
- AnnotationAuthorChangedEventArgs.cs
- Scripts.cs
- ArrayWithOffset.cs
- ServiceDiscoveryElement.cs
- ObjectMemberMapping.cs
- MaskedTextProvider.cs