Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TextOnlyOutput.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpPostedFileBase.cs
- XmlResolver.cs
- BridgeDataReader.cs
- ApplicationContext.cs
- CqlParserHelpers.cs
- SqlDesignerDataSourceView.cs
- ErrorTableItemStyle.cs
- DataViewSetting.cs
- DataGrid.cs
- ArgumentDesigner.xaml.cs
- WebPartsPersonalizationAuthorization.cs
- ProcessHostServerConfig.cs
- OdbcException.cs
- WindowsFormsHelpers.cs
- FixedSOMElement.cs
- PagesChangedEventArgs.cs
- PackageProperties.cs
- MultiTrigger.cs
- ThreadPool.cs
- SafeHandles.cs
- ExpiredSecurityTokenException.cs
- Size3DValueSerializer.cs
- DbConnectionPoolGroupProviderInfo.cs
- DbParameterHelper.cs
- TypeUtils.cs
- IdentityHolder.cs
- DataListItemCollection.cs
- ScrollItemProviderWrapper.cs
- ListenerAdaptersInstallComponent.cs
- DictionaryContent.cs
- XmlSchemaChoice.cs
- SRGSCompiler.cs
- MinMaxParagraphWidth.cs
- SqlCommand.cs
- RepeatButton.cs
- NaturalLanguageHyphenator.cs
- WebPartZone.cs
- NameValueSectionHandler.cs
- CellTreeNodeVisitors.cs
- MarshalByValueComponent.cs
- SqlCacheDependencyDatabaseCollection.cs
- ExtensibleClassFactory.cs
- DataBinding.cs
- XmlExpressionDumper.cs
- PlainXmlDeserializer.cs
- Listbox.cs
- RulePatternOps.cs
- BinaryWriter.cs
- WinFormsSpinner.cs
- PropertyDescriptorGridEntry.cs
- DependencyObjectPropertyDescriptor.cs
- RtfNavigator.cs
- webproxy.cs
- CompoundFileStorageReference.cs
- ErrorFormatterPage.cs
- BitmapFrameEncode.cs
- ActionMessageFilterTable.cs
- CodeAccessSecurityEngine.cs
- DataTable.cs
- BrowserDefinitionCollection.cs
- ContainsSearchOperator.cs
- HtmlLiteralTextAdapter.cs
- TextEditorParagraphs.cs
- WmpBitmapDecoder.cs
- TextDecorationCollection.cs
- IList.cs
- SpotLight.cs
- OSFeature.cs
- NavigationCommands.cs
- InstanceDataCollectionCollection.cs
- CheckBox.cs
- InstancePersistenceEvent.cs
- BridgeDataReader.cs
- AssemblyAssociatedContentFileAttribute.cs
- EdmToObjectNamespaceMap.cs
- DetailsViewInsertEventArgs.cs
- DataServiceContext.cs
- Substitution.cs
- InitializationEventAttribute.cs
- ComponentResourceKeyConverter.cs
- HeaderCollection.cs
- UTF7Encoding.cs
- ValidationHelpers.cs
- RuntimeHelpers.cs
- PolicyManager.cs
- OletxDependentTransaction.cs
- ExpandedWrapper.cs
- LinqDataSourceDisposeEventArgs.cs
- ItemsControl.cs
- ChannelRequirements.cs
- TextComposition.cs
- ContentDisposition.cs
- ZipIOFileItemStream.cs
- IisTraceListener.cs
- WCFModelStrings.Designer.cs
- CodeGotoStatement.cs
- BooleanExpr.cs
- SqlWebEventProvider.cs
- HttpResponseInternalBase.cs
- ValidationPropertyAttribute.cs