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
- XslTransform.cs
- SecurityVerifiedMessage.cs
- PrintDocument.cs
- HitTestParameters.cs
- DropDownButton.cs
- StylusOverProperty.cs
- XmlAttribute.cs
- PerformanceCountersBase.cs
- StringExpressionSet.cs
- PlaceHolder.cs
- PropertyValueUIItem.cs
- SettingsSavedEventArgs.cs
- DesignerHelpers.cs
- ArgumentException.cs
- Stack.cs
- complextypematerializer.cs
- ParameterBuilder.cs
- CodeExpressionStatement.cs
- PipelineComponent.cs
- TextRangeSerialization.cs
- ListViewItem.cs
- CompilerTypeWithParams.cs
- QilFactory.cs
- RegexParser.cs
- BufferModeSettings.cs
- LightweightCodeGenerator.cs
- ProfileManager.cs
- DataTableNewRowEvent.cs
- HtmlUtf8RawTextWriter.cs
- Math.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ListSourceHelper.cs
- SqlFileStream.cs
- EntityStoreSchemaGenerator.cs
- ExpressionCopier.cs
- ComponentEditorForm.cs
- SQLChars.cs
- DecimalAnimation.cs
- InProcStateClientManager.cs
- CodeMemberProperty.cs
- Binding.cs
- BindingCollectionElement.cs
- LogStore.cs
- GraphicsPathIterator.cs
- MouseEventArgs.cs
- ClientSideProviderDescription.cs
- FileDialog_Vista.cs
- _NTAuthentication.cs
- BindingsCollection.cs
- DataServiceHostWrapper.cs
- WebScriptClientGenerator.cs
- UnsafeNativeMethods.cs
- FilteredAttributeCollection.cs
- TextPenaltyModule.cs
- MemoryStream.cs
- SubMenuStyle.cs
- DbConnectionInternal.cs
- AdapterSwitches.cs
- BindingValueChangedEventArgs.cs
- FirstMatchCodeGroup.cs
- AQNBuilder.cs
- CallbackException.cs
- SqlConnectionPoolGroupProviderInfo.cs
- FormConverter.cs
- BuildProviderCollection.cs
- ObjectDataSourceMethodEditor.cs
- BindingManagerDataErrorEventArgs.cs
- CodeGenerator.cs
- NonClientArea.cs
- SerializationInfo.cs
- RemotingServices.cs
- DebugTracing.cs
- OleDbDataAdapter.cs
- ModulesEntry.cs
- PropertyDescriptorComparer.cs
- BooleanStorage.cs
- XmlCharCheckingWriter.cs
- TextElementCollectionHelper.cs
- mansign.cs
- DSASignatureFormatter.cs
- DataGridViewHeaderCell.cs
- PtsHost.cs
- XmlSchemaInclude.cs
- DataGridItemCollection.cs
- UniqueEventHelper.cs
- ImageMap.cs
- ChannelCredentials.cs
- ItemsPresenter.cs
- DeploymentSectionCache.cs
- Simplifier.cs
- ColumnHeader.cs
- ChannelServices.cs
- ImpersonationContext.cs
- DLinqColumnProvider.cs
- SecurityPolicySection.cs
- IHttpResponseInternal.cs
- GroupBoxRenderer.cs
- ConfigXmlDocument.cs
- HtmlFormWrapper.cs
- Activator.cs