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
- WindowsBrush.cs
- ObfuscationAttribute.cs
- AtomContentProperty.cs
- PixelShader.cs
- UIPropertyMetadata.cs
- RestHandlerFactory.cs
- NewArray.cs
- DoubleLink.cs
- FixedElement.cs
- PresentationSource.cs
- DashStyle.cs
- Latin1Encoding.cs
- RangeValidator.cs
- GridViewColumn.cs
- SortAction.cs
- InteropBitmapSource.cs
- FragmentNavigationEventArgs.cs
- PreservationFileWriter.cs
- WindowsContainer.cs
- Helper.cs
- ApplicationManager.cs
- CommonXSendMessage.cs
- ChineseLunisolarCalendar.cs
- ApplicationServiceHelper.cs
- WsrmTraceRecord.cs
- TemplateField.cs
- QilPatternVisitor.cs
- GenericsInstances.cs
- QueryReaderSettings.cs
- SmtpFailedRecipientsException.cs
- TextRange.cs
- CrossSiteScriptingValidation.cs
- TextUtf8RawTextWriter.cs
- TemplateBuilder.cs
- Mappings.cs
- BufferModesCollection.cs
- Condition.cs
- PopOutPanel.cs
- WebBrowser.cs
- BooleanConverter.cs
- OdbcException.cs
- DiffuseMaterial.cs
- SoapElementAttribute.cs
- WebPartVerb.cs
- CompoundFileStreamReference.cs
- BuildProvider.cs
- BamlCollectionHolder.cs
- ValidationHelper.cs
- DropShadowBitmapEffect.cs
- OuterGlowBitmapEffect.cs
- EntityDataSourceWrapper.cs
- PropertyPathConverter.cs
- UpdatePanelTrigger.cs
- TemplateAction.cs
- XmlSerializerAssemblyAttribute.cs
- FixedSOMTableRow.cs
- CacheHelper.cs
- OracleConnection.cs
- NavigationPropertyEmitter.cs
- ReadOnlyDictionary.cs
- ModelPropertyDescriptor.cs
- Environment.cs
- MetaColumn.cs
- XmlRawWriter.cs
- ButtonBase.cs
- EventLogger.cs
- XmlMapping.cs
- ZipArchive.cs
- XamlTypeMapper.cs
- _emptywebproxy.cs
- AssociationSetMetadata.cs
- SafeRegistryHandle.cs
- TextProperties.cs
- TreeViewImageIndexConverter.cs
- DataRelationCollection.cs
- CallSiteHelpers.cs
- RtfToken.cs
- Attributes.cs
- TemplateComponentConnector.cs
- ComponentDesigner.cs
- HwndKeyboardInputProvider.cs
- TextPattern.cs
- SiteMapSection.cs
- HttpApplicationStateWrapper.cs
- RichTextBoxAutomationPeer.cs
- DataGridRow.cs
- RefType.cs
- Image.cs
- UpdatePanelTriggerCollection.cs
- QilLiteral.cs
- CultureInfo.cs
- TdsParserHelperClasses.cs
- BaseCollection.cs
- AttachedPropertyBrowsableAttribute.cs
- ExpressionTextBoxAutomationPeer.cs
- RangeValueProviderWrapper.cs
- HandledEventArgs.cs
- ObjectDataSource.cs
- GenericEnumConverter.cs
- ParameterCollectionEditorForm.cs