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
- HealthMonitoringSection.cs
- SystemInformation.cs
- QuaternionValueSerializer.cs
- ParameterBuilder.cs
- ResourceDisplayNameAttribute.cs
- DecoderExceptionFallback.cs
- MetabaseServerConfig.cs
- BooleanConverter.cs
- ToolStripContentPanel.cs
- Hyperlink.cs
- TextServicesDisplayAttribute.cs
- ImageIndexConverter.cs
- future.cs
- DeviceContext2.cs
- DeploymentExceptionMapper.cs
- TypedTableGenerator.cs
- _NegoState.cs
- TemplatedMailWebEventProvider.cs
- IPipelineRuntime.cs
- DataServiceKeyAttribute.cs
- XmlSchemaSimpleTypeUnion.cs
- validation.cs
- FakeModelPropertyImpl.cs
- HttpCookiesSection.cs
- LinqDataSourceDeleteEventArgs.cs
- KeyValueInternalCollection.cs
- ForceCopyBuildProvider.cs
- IsolationInterop.cs
- MailMessageEventArgs.cs
- COM2ComponentEditor.cs
- DbConnectionStringBuilder.cs
- CompositionDesigner.cs
- ResourcesBuildProvider.cs
- ValidationManager.cs
- TextBoxBase.cs
- PermissionToken.cs
- ScriptControl.cs
- ShapingEngine.cs
- LocalBuilder.cs
- ProcessHostConfigUtils.cs
- ToolStripRenderer.cs
- UserControlBuildProvider.cs
- HttpGetProtocolImporter.cs
- UrlMappingsSection.cs
- CapabilitiesRule.cs
- ConditionCollection.cs
- WindowsImpersonationContext.cs
- HMACSHA384.cs
- XPathChildIterator.cs
- ByeMessageApril2005.cs
- XmlSchemaAttribute.cs
- connectionpool.cs
- EffectiveValueEntry.cs
- UITypeEditor.cs
- IUnknownConstantAttribute.cs
- ColumnTypeConverter.cs
- WindowsProgressbar.cs
- Properties.cs
- PageRanges.cs
- Lease.cs
- _ChunkParse.cs
- NamespaceCollection.cs
- HTTPNotFoundHandler.cs
- WebPartConnectionsCloseVerb.cs
- odbcmetadatafactory.cs
- RelationshipEnd.cs
- TrackPoint.cs
- TransactionFlowBindingElementImporter.cs
- Source.cs
- ModifierKeysConverter.cs
- SyndicationSerializer.cs
- Property.cs
- TransformPatternIdentifiers.cs
- PartManifestEntry.cs
- RenderDataDrawingContext.cs
- InternalConfigRoot.cs
- DataGridViewRowStateChangedEventArgs.cs
- ColorTransform.cs
- UserControl.cs
- DateTimePicker.cs
- PositiveTimeSpanValidatorAttribute.cs
- CommandEventArgs.cs
- HistoryEventArgs.cs
- MergeFailedEvent.cs
- EventHandlerService.cs
- WebBrowserEvent.cs
- DescriptionAttribute.cs
- DeferredTextReference.cs
- Int16KeyFrameCollection.cs
- EpmAttributeNameBuilder.cs
- RowSpanVector.cs
- MobileSysDescriptionAttribute.cs
- SubqueryRules.cs
- TextRangeEdit.cs
- TaiwanCalendar.cs
- _NestedSingleAsyncResult.cs
- SqlTriggerAttribute.cs
- MetadataArtifactLoader.cs
- OleDbMetaDataFactory.cs
- ImageList.cs