Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- WindowsStatusBar.cs
- Condition.cs
- DataListComponentEditor.cs
- BrowserCapabilitiesFactory.cs
- CornerRadius.cs
- AsyncCodeActivityContext.cs
- DragCompletedEventArgs.cs
- SafeNativeMethodsMilCoreApi.cs
- Comparer.cs
- XmlReflectionMember.cs
- ValueChangedEventManager.cs
- EventRoute.cs
- AuthorizationSection.cs
- MulticastDelegate.cs
- UrlAuthorizationModule.cs
- ComNativeDescriptor.cs
- ParallelTimeline.cs
- SqlDataSourceStatusEventArgs.cs
- MailSettingsSection.cs
- XPathParser.cs
- ConnectionsZoneDesigner.cs
- DrawTreeNodeEventArgs.cs
- SmiTypedGetterSetter.cs
- NativeMethodsCLR.cs
- AccessDataSourceView.cs
- ChannelFactoryRefCache.cs
- SerialPinChanges.cs
- ThicknessAnimationBase.cs
- Attributes.cs
- StrokeNode.cs
- Types.cs
- Point3DCollection.cs
- DefaultValidator.cs
- Convert.cs
- HttpHandlersSection.cs
- DataGrid.cs
- webeventbuffer.cs
- AttachInfo.cs
- ComplexObject.cs
- EasingFunctionBase.cs
- DrawListViewColumnHeaderEventArgs.cs
- DiffuseMaterial.cs
- metadatamappinghashervisitor.cs
- DataSourceSelectArguments.cs
- AnalyzedTree.cs
- NetStream.cs
- BmpBitmapEncoder.cs
- cryptoapiTransform.cs
- ConfigXmlText.cs
- DataGridViewButtonCell.cs
- MarshalByValueComponent.cs
- WinInet.cs
- GetLedgerRequest.cs
- WMIInterop.cs
- CommandEventArgs.cs
- AspNetHostingPermission.cs
- InfoCardRSACryptoProvider.cs
- EventDescriptorCollection.cs
- DrawingGroup.cs
- StreamGeometry.cs
- PointAnimationUsingPath.cs
- CalendarDay.cs
- XmlFileEditor.cs
- CacheChildrenQuery.cs
- TagMapInfo.cs
- SignedXml.cs
- AuthenticationServiceManager.cs
- TreeChangeInfo.cs
- PreviewPrintController.cs
- FusionWrap.cs
- XmlDownloadManager.cs
- PropertySourceInfo.cs
- _WebProxyDataBuilder.cs
- FormatterConverter.cs
- ParallelEnumerableWrapper.cs
- ColumnClickEvent.cs
- RoleGroupCollection.cs
- WindowsProgressbar.cs
- TransactionManager.cs
- XmlWrappingReader.cs
- GlyphsSerializer.cs
- Transform3D.cs
- GrammarBuilderWildcard.cs
- HttpCacheVary.cs
- ListControlConvertEventArgs.cs
- ObjectSelectorEditor.cs
- BitmapEffectDrawingContextState.cs
- NameValueCollection.cs
- SQLBytes.cs
- GridLengthConverter.cs
- InArgument.cs
- WorkflowHostingResponseContext.cs
- ProfileGroupSettings.cs
- NativeMethods.cs
- RolePrincipal.cs
- dtdvalidator.cs
- AbandonedMutexException.cs
- log.cs
- ViewSimplifier.cs
- ConfigDefinitionUpdates.cs