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
- TransformPattern.cs
- RichTextBox.cs
- SqlUDTStorage.cs
- FreezableOperations.cs
- SelectionRangeConverter.cs
- CodeLinePragma.cs
- ProfileSection.cs
- AttributeUsageAttribute.cs
- PnrpPermission.cs
- FactoryGenerator.cs
- StorageConditionPropertyMapping.cs
- BinaryUtilClasses.cs
- BufferedGraphicsContext.cs
- Normalization.cs
- ObjectMaterializedEventArgs.cs
- UpdateTranslator.cs
- InteropExecutor.cs
- Update.cs
- HttpRequestCacheValidator.cs
- XmlDictionary.cs
- TransformCollection.cs
- MatrixCamera.cs
- CompiledQuery.cs
- Point.cs
- DbConnectionPoolGroup.cs
- TreeIterators.cs
- HtmlImage.cs
- InternalsVisibleToAttribute.cs
- metadatamappinghashervisitor.cs
- DetailsViewActionList.cs
- PersonalizationEntry.cs
- WebControlAdapter.cs
- FontDifferentiator.cs
- DependencyPropertyDescriptor.cs
- ToolboxItemFilterAttribute.cs
- ToolStripCollectionEditor.cs
- CapiSymmetricAlgorithm.cs
- ButtonPopupAdapter.cs
- InkSerializer.cs
- CssTextWriter.cs
- AnnotationHighlightLayer.cs
- RoleManagerModule.cs
- DeviceContext2.cs
- Point.cs
- StyleTypedPropertyAttribute.cs
- ValidatorCollection.cs
- DynamicPropertyHolder.cs
- PriorityBinding.cs
- DataGridViewCellCollection.cs
- SqlGatherConsumedAliases.cs
- ResXResourceReader.cs
- HelpEvent.cs
- BindingsCollection.cs
- NotImplementedException.cs
- DrawItemEvent.cs
- TypeContext.cs
- CacheEntry.cs
- HMACRIPEMD160.cs
- ModelTreeEnumerator.cs
- OleDbFactory.cs
- HttpCachePolicy.cs
- ResourcesChangeInfo.cs
- TrackingQuery.cs
- SqlLiftWhereClauses.cs
- ProcessDesigner.cs
- XmlAttributeOverrides.cs
- PropertyMetadata.cs
- BamlLocalizationDictionary.cs
- RawMouseInputReport.cs
- TreeViewItem.cs
- ProcessHostMapPath.cs
- LicFileLicenseProvider.cs
- EncodingDataItem.cs
- EdmTypeAttribute.cs
- XmlWellformedWriter.cs
- VersionValidator.cs
- SwitchLevelAttribute.cs
- BufferBuilder.cs
- LoginAutoFormat.cs
- _StreamFramer.cs
- exports.cs
- PropertyKey.cs
- DbCommandDefinition.cs
- TagNameToTypeMapper.cs
- StreamGeometryContext.cs
- HitTestParameters3D.cs
- ControlAdapter.cs
- cookieexception.cs
- CodeTypeDelegate.cs
- VoiceChangeEventArgs.cs
- TrackingConditionCollection.cs
- XPathMessageFilterElement.cs
- TableDetailsRow.cs
- DeriveBytes.cs
- SchemaComplexType.cs
- PathFigureCollection.cs
- COM2ComponentEditor.cs
- RawContentTypeMapper.cs
- Base64Stream.cs
- SecurityException.cs