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
- XamlBrushSerializer.cs
- DataGridViewComponentPropertyGridSite.cs
- HtmlTable.cs
- UnknownBitmapDecoder.cs
- InvokePatternIdentifiers.cs
- WebPart.cs
- List.cs
- Ops.cs
- WCFBuildProvider.cs
- CodeExpressionStatement.cs
- ContentTextAutomationPeer.cs
- Enum.cs
- MultiView.cs
- PEFileReader.cs
- DbParameterCollection.cs
- SiteMapNodeItem.cs
- MembershipValidatePasswordEventArgs.cs
- MessageDescriptionCollection.cs
- EdmProviderManifest.cs
- CryptoConfig.cs
- CustomSignedXml.cs
- DocumentEventArgs.cs
- DbModificationClause.cs
- XamlDesignerSerializationManager.cs
- SqlDataSource.cs
- StringToken.cs
- ConstructorBuilder.cs
- BamlStream.cs
- AudioStateChangedEventArgs.cs
- SafeRightsManagementSessionHandle.cs
- EventlogProvider.cs
- PropertyPath.cs
- IisTraceWebEventProvider.cs
- NonSerializedAttribute.cs
- NullableFloatSumAggregationOperator.cs
- DataMemberFieldConverter.cs
- TablePattern.cs
- ExpressionBuilder.cs
- MaterialGroup.cs
- CultureTable.cs
- NeutralResourcesLanguageAttribute.cs
- TraceLog.cs
- SiteMapNodeCollection.cs
- MatrixAnimationUsingPath.cs
- MenuAdapter.cs
- ContractMapping.cs
- GrammarBuilderWildcard.cs
- FormClosingEvent.cs
- FormatSettings.cs
- MobileSysDescriptionAttribute.cs
- RegexCode.cs
- FormsAuthentication.cs
- OracleParameterCollection.cs
- XmlTextEncoder.cs
- SiteMapSection.cs
- ToolStripItemEventArgs.cs
- WebPartExportVerb.cs
- Dispatcher.cs
- CoreSwitches.cs
- TextStore.cs
- XmlSchemaSubstitutionGroup.cs
- TabControl.cs
- InstallerTypeAttribute.cs
- CacheEntry.cs
- ToolStripContainerDesigner.cs
- LOSFormatter.cs
- MetafileHeaderWmf.cs
- ASCIIEncoding.cs
- HttpModulesSection.cs
- _TimerThread.cs
- VisualBrush.cs
- UnsafeNativeMethods.cs
- DefaultProxySection.cs
- FactoryGenerator.cs
- WebPartUtil.cs
- VisualTreeUtils.cs
- PathFigure.cs
- HtmlShimManager.cs
- MatrixTransform.cs
- XmlSchema.cs
- Error.cs
- ButtonBase.cs
- XmlnsPrefixAttribute.cs
- Listbox.cs
- StylusButtonEventArgs.cs
- FlowSwitchDesigner.xaml.cs
- ConfigXmlComment.cs
- HttpChannelFactory.cs
- SoapParser.cs
- WmlCalendarAdapter.cs
- DbSetClause.cs
- BufferedStream.cs
- RuleSettingsCollection.cs
- HtmlInputControl.cs
- SqlParameter.cs
- BooleanExpr.cs
- WriteStateInfoBase.cs
- HashUtility.cs
- LassoSelectionBehavior.cs
- FileLevelControlBuilderAttribute.cs