Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XamlReaderHelper.cs
- QueuePathEditor.cs
- DbConnectionStringCommon.cs
- KeyTimeConverter.cs
- TemplateBamlRecordReader.cs
- BufferModeSettings.cs
- RewritingPass.cs
- SecurityTokenTypes.cs
- HelpInfo.cs
- Pair.cs
- Visual.cs
- ToolStripItemEventArgs.cs
- GlobalProxySelection.cs
- InstanceKeyView.cs
- HashSet.cs
- WinFormsUtils.cs
- IFlowDocumentViewer.cs
- _ChunkParse.cs
- DispatcherOperation.cs
- ToolStripMenuItem.cs
- ClientScriptItemCollection.cs
- AudioStateChangedEventArgs.cs
- WebServiceHost.cs
- SqlCacheDependencySection.cs
- SmtpNetworkElement.cs
- CmsInterop.cs
- Rfc2898DeriveBytes.cs
- CachedFontFamily.cs
- SynchronizationLockException.cs
- TextComposition.cs
- MenuItemBinding.cs
- EntityDesignerUtils.cs
- PropertyEmitter.cs
- FormsAuthentication.cs
- BitmapInitialize.cs
- BuildResult.cs
- TextTreeObjectNode.cs
- UIElement.cs
- ComponentChangedEvent.cs
- ElementMarkupObject.cs
- ScrollBar.cs
- DbConvert.cs
- Glyph.cs
- FontCollection.cs
- StandardTransformFactory.cs
- SchemaHelper.cs
- Viewport3DAutomationPeer.cs
- BamlResourceContent.cs
- MsmqInputChannelBase.cs
- ButtonPopupAdapter.cs
- NetTcpBinding.cs
- BitmapCodecInfoInternal.cs
- Mouse.cs
- CounterCreationDataCollection.cs
- XmlSchemaDatatype.cs
- ErrorFormatter.cs
- PointLightBase.cs
- XmlILModule.cs
- _Win32.cs
- Application.cs
- ResourceAttributes.cs
- PublisherIdentityPermission.cs
- DataGridCheckBoxColumn.cs
- DataKeyArray.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- IconConverter.cs
- ChangeBlockUndoRecord.cs
- ListBindingConverter.cs
- Aggregates.cs
- Internal.cs
- StyleSheet.cs
- RowsCopiedEventArgs.cs
- DataReceivedEventArgs.cs
- WsatConfiguration.cs
- CreateUserWizardStep.cs
- ToolStripDropDownClosedEventArgs.cs
- DataControlLinkButton.cs
- BinaryOperationBinder.cs
- DataMember.cs
- DbExpressionVisitor.cs
- TdsParserStateObject.cs
- LineMetrics.cs
- SqlProviderManifest.cs
- XmlSchemaSimpleType.cs
- ProfileSection.cs
- Sequence.cs
- AttachInfo.cs
- Wildcard.cs
- RangeContentEnumerator.cs
- AsyncStreamReader.cs
- UnsafeNativeMethods.cs
- DrawingContextWalker.cs
- MasterPageBuildProvider.cs
- DashStyle.cs
- XmlChoiceIdentifierAttribute.cs
- IIS7UserPrincipal.cs
- SetIterators.cs
- DataColumnChangeEvent.cs
- ToolStripRendererSwitcher.cs
- SelectedDatesCollection.cs