Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- TextTreeRootNode.cs
- ControlTemplate.cs
- EpmCustomContentDeSerializer.cs
- SelectorAutomationPeer.cs
- ObjectListCommandCollection.cs
- CanExecuteRoutedEventArgs.cs
- PasswordRecovery.cs
- HtmlLink.cs
- SimpleHandlerBuildProvider.cs
- Comparer.cs
- MachineSettingsSection.cs
- EntitySetDataBindingList.cs
- WebContentFormatHelper.cs
- XmlSerializationReader.cs
- WindowCollection.cs
- XmlAttributeOverrides.cs
- OptimalTextSource.cs
- AsyncPostBackTrigger.cs
- DataGridItem.cs
- ArgumentOutOfRangeException.cs
- ClientFormsAuthenticationMembershipProvider.cs
- MenuEventArgs.cs
- unsafenativemethodsother.cs
- SqlDataSourceSelectingEventArgs.cs
- HwndMouseInputProvider.cs
- EastAsianLunisolarCalendar.cs
- AuthenticationModulesSection.cs
- SqlTrackingQuery.cs
- RelationshipSet.cs
- Quaternion.cs
- ControlIdConverter.cs
- XmlCompatibilityReader.cs
- _Events.cs
- DataExchangeServiceBinder.cs
- NativeMsmqMessage.cs
- WindowsStatic.cs
- XmlDomTextWriter.cs
- IIS7ConfigurationLoader.cs
- PathSegment.cs
- HierarchicalDataSourceControl.cs
- MasterPageParser.cs
- EventDescriptorCollection.cs
- DataGridViewEditingControlShowingEventArgs.cs
- Polyline.cs
- Msec.cs
- ConfigurationValidatorAttribute.cs
- ExternalCalls.cs
- XmlAttributeOverrides.cs
- StylusDevice.cs
- InvokePattern.cs
- UserCancellationException.cs
- InkCanvasSelection.cs
- PkcsMisc.cs
- IndexedString.cs
- GregorianCalendarHelper.cs
- ResolveMatchesCD1.cs
- StrongNameKeyPair.cs
- ListViewHitTestInfo.cs
- ExtendedPropertyCollection.cs
- StylusPointCollection.cs
- MemberHolder.cs
- AsymmetricAlgorithm.cs
- SineEase.cs
- SimpleFieldTemplateFactory.cs
- PartialTrustHelpers.cs
- OdbcInfoMessageEvent.cs
- FormViewDeleteEventArgs.cs
- HyperLinkColumn.cs
- PeerObject.cs
- ExtendedTransformFactory.cs
- BitmapCacheBrush.cs
- RootBuilder.cs
- TrackingMemoryStreamFactory.cs
- TraceContextEventArgs.cs
- DataBoundLiteralControl.cs
- RemotingClientProxy.cs
- FindCompletedEventArgs.cs
- StatusBar.cs
- EpmCustomContentSerializer.cs
- OrderedDictionary.cs
- ObjectSpanRewriter.cs
- SourceLineInfo.cs
- SecurityException.cs
- AmbientLight.cs
- EllipseGeometry.cs
- StorageMappingItemCollection.cs
- HandlerBase.cs
- HtmlLink.cs
- AnnotationComponentChooser.cs
- DataGridViewTextBoxColumn.cs
- BooleanConverter.cs
- ReturnEventArgs.cs
- MemberHolder.cs
- Propagator.Evaluator.cs
- XmlSchemaFacet.cs
- XmlSchemaInfo.cs
- MonitoringDescriptionAttribute.cs
- SelectionRangeConverter.cs
- InputManager.cs
- AnnotationDocumentPaginator.cs