Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DiscoveryClientChannelBase.cs
- SingleAnimationBase.cs
- ToolStripProgressBar.cs
- MenuBindingsEditorForm.cs
- ExpressionCopier.cs
- Validator.cs
- CalendarSelectionChangedEventArgs.cs
- SubMenuStyleCollection.cs
- FieldToken.cs
- documentsequencetextview.cs
- DbCommandTree.cs
- ListItemViewAttribute.cs
- TableItemProviderWrapper.cs
- SatelliteContractVersionAttribute.cs
- Serializer.cs
- EventKeyword.cs
- Missing.cs
- StaticResourceExtension.cs
- Filter.cs
- SystemResources.cs
- ChainOfDependencies.cs
- DBSchemaTable.cs
- ValidatingPropertiesEventArgs.cs
- ExceptionValidationRule.cs
- MembershipUser.cs
- UnauthorizedAccessException.cs
- datacache.cs
- DataSourceNameHandler.cs
- RoleService.cs
- ThreadStartException.cs
- CharAnimationUsingKeyFrames.cs
- RowType.cs
- StatusBarDrawItemEvent.cs
- SqlCacheDependency.cs
- FactoryMaker.cs
- SystemIPAddressInformation.cs
- WCFModelStrings.Designer.cs
- FormatSettings.cs
- Argument.cs
- WebSysDisplayNameAttribute.cs
- PointAnimationUsingKeyFrames.cs
- CertificateManager.cs
- LinqDataSourceSelectEventArgs.cs
- DataViewManagerListItemTypeDescriptor.cs
- ListViewDeleteEventArgs.cs
- BitmapPalette.cs
- UInt16Converter.cs
- AnnotationHelper.cs
- PrintingPermission.cs
- X509ChainElement.cs
- SqlProviderServices.cs
- GetIsBrowserClientRequest.cs
- RulePatternOps.cs
- PassportAuthenticationEventArgs.cs
- ReaderContextStackData.cs
- TreeNodeMouseHoverEvent.cs
- UserUseLicenseDictionaryLoader.cs
- TextDecorationCollectionConverter.cs
- UniformGrid.cs
- PartialTrustValidationBehavior.cs
- iisPickupDirectory.cs
- DataRowCollection.cs
- QilGeneratorEnv.cs
- CreateUserErrorEventArgs.cs
- XPathConvert.cs
- FormsAuthenticationUser.cs
- XmlSchemaRedefine.cs
- Event.cs
- OleDbWrapper.cs
- CalendarKeyboardHelper.cs
- TreeNodeCollection.cs
- COAUTHINFO.cs
- DataGridBoolColumn.cs
- DirectoryNotFoundException.cs
- CfgParser.cs
- RawStylusInput.cs
- XmlSchemaComplexContentRestriction.cs
- XmlTextWriter.cs
- WorkItem.cs
- SymLanguageType.cs
- ReversePositionQuery.cs
- InputLangChangeRequestEvent.cs
- ListViewDataItem.cs
- SinglePageViewer.cs
- ServerIdentity.cs
- Compress.cs
- VisualBrush.cs
- SessionEndedEventArgs.cs
- CorePropertiesFilter.cs
- RuntimeIdentifierPropertyAttribute.cs
- SmiMetaData.cs
- ObservableCollection.cs
- XmlSchemaSimpleTypeUnion.cs
- InkCanvasSelectionAdorner.cs
- AuthenticodeSignatureInformation.cs
- AutoResetEvent.cs
- cookieexception.cs
- TypefaceMap.cs
- SqlTypesSchemaImporter.cs
- SessionSwitchEventArgs.cs