Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Xml / System / Xml / Dom / XmlDomTextWriter.cs / 1 / XmlDomTextWriter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System; using System.IO; using System.Text; // Represents a writer that will make it possible to work with prefixes even // if the namespace is not specified. // This is not possible with XmlTextWriter. But this class inherits XmlTextWriter. internal class XmlDOMTextWriter : XmlTextWriter { public XmlDOMTextWriter( Stream w, Encoding encoding ) : base( w,encoding ) { } public XmlDOMTextWriter( String filename, Encoding encoding ) : base( filename,encoding ){ } public XmlDOMTextWriter( TextWriter w ) : base( w ){ } // Overrides the baseclass implementation so that emptystring prefixes do // do not fail if namespace is not specified. public override void WriteStartElement( string prefix, string localName, string ns ){ if( ( ns.Length == 0 ) && ( prefix.Length != 0 ) ) prefix = "" ; base.WriteStartElement( prefix, localName, ns ); } // Overrides the baseclass implementation so that emptystring prefixes do // do not fail if namespace is not specified. public override void WriteStartAttribute( string prefix, string localName, string ns ){ if( ( ns.Length == 0 ) && ( prefix.Length != 0 ) ) prefix = "" ; base.WriteStartAttribute( prefix, localName, ns ); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System; using System.IO; using System.Text; // Represents a writer that will make it possible to work with prefixes even // if the namespace is not specified. // This is not possible with XmlTextWriter. But this class inherits XmlTextWriter. internal class XmlDOMTextWriter : XmlTextWriter { public XmlDOMTextWriter( Stream w, Encoding encoding ) : base( w,encoding ) { } public XmlDOMTextWriter( String filename, Encoding encoding ) : base( filename,encoding ){ } public XmlDOMTextWriter( TextWriter w ) : base( w ){ } // Overrides the baseclass implementation so that emptystring prefixes do // do not fail if namespace is not specified. public override void WriteStartElement( string prefix, string localName, string ns ){ if( ( ns.Length == 0 ) && ( prefix.Length != 0 ) ) prefix = "" ; base.WriteStartElement( prefix, localName, ns ); } // Overrides the baseclass implementation so that emptystring prefixes do // do not fail if namespace is not specified. public override void WriteStartAttribute( string prefix, string localName, string ns ){ if( ( ns.Length == 0 ) && ( prefix.Length != 0 ) ) prefix = "" ; base.WriteStartAttribute( prefix, localName, ns ); } } } // 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
- SamlSubjectStatement.cs
- XPathArrayIterator.cs
- CopyCodeAction.cs
- TypeDelegator.cs
- BreakRecordTable.cs
- Msec.cs
- System.Data.OracleClient_BID.cs
- WindowsStreamSecurityBindingElement.cs
- ProcessHostServerConfig.cs
- CalendarModeChangedEventArgs.cs
- XXXOnTypeBuilderInstantiation.cs
- SessionIDManager.cs
- Evaluator.cs
- TextOptionsInternal.cs
- XmlNamespaceMappingCollection.cs
- BoundingRectTracker.cs
- WebPartCatalogAddVerb.cs
- Transactions.cs
- FixedPageAutomationPeer.cs
- MarshalByValueComponent.cs
- TimeSpanOrInfiniteValidator.cs
- SQLSingleStorage.cs
- ReliableInputConnection.cs
- EmptyReadOnlyDictionaryInternal.cs
- MostlySingletonList.cs
- FileDialog.cs
- TextParagraphProperties.cs
- HandleCollector.cs
- HandlerFactoryCache.cs
- DateTimeConstantAttribute.cs
- _SSPIWrapper.cs
- HttpCookiesSection.cs
- LayoutTable.cs
- Rect3D.cs
- DiagnosticTraceSchemas.cs
- DBCommand.cs
- ObservableCollection.cs
- DocumentViewer.cs
- VersionConverter.cs
- ItemList.cs
- ScriptResourceInfo.cs
- DataTableReader.cs
- TabPageDesigner.cs
- SetterBaseCollection.cs
- ParagraphVisual.cs
- PreloadedPackages.cs
- SqlCharStream.cs
- StatusBar.cs
- SqlUtil.cs
- InvalidCommandTreeException.cs
- WebServicesInteroperability.cs
- ComponentEvent.cs
- AggregateException.cs
- JpegBitmapDecoder.cs
- NameSpaceExtractor.cs
- URIFormatException.cs
- OletxVolatileEnlistment.cs
- ZipIOFileItemStream.cs
- XmlSchemaAppInfo.cs
- UnsafePeerToPeerMethods.cs
- StrokeNodeOperations.cs
- NonVisualControlAttribute.cs
- SynchronizedReadOnlyCollection.cs
- LayoutEngine.cs
- SynchronizationContext.cs
- OutputCacheSettingsSection.cs
- SystemKeyConverter.cs
- ExceptionUtil.cs
- XmlSchemaComplexType.cs
- ListComponentEditorPage.cs
- ToolStripComboBox.cs
- CompilerScope.Storage.cs
- PrintSchema.cs
- EntityParameter.cs
- ManifestResourceInfo.cs
- ProfilePropertySettingsCollection.cs
- HtmlLinkAdapter.cs
- DataSourceView.cs
- CroppedBitmap.cs
- StackBuilderSink.cs
- ImageAttributes.cs
- InputProviderSite.cs
- XmlDownloadManager.cs
- MobileControlBuilder.cs
- XmlDeclaration.cs
- MatchSingleFxEngineOpcode.cs
- CellQuery.cs
- LocatorPartList.cs
- FilterEventArgs.cs
- ClientTarget.cs
- MimeMultiPart.cs
- TextRunTypographyProperties.cs
- BuilderPropertyEntry.cs
- DBNull.cs
- ForEach.cs
- SqlInternalConnectionTds.cs
- ParserStack.cs
- Table.cs
- ComponentRenameEvent.cs
- Subset.cs