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
- StreamResourceInfo.cs
- CodeDomExtensionMethods.cs
- XPathNavigator.cs
- WorkflowMessageEventHandler.cs
- SecurityUniqueId.cs
- IdentityHolder.cs
- AttachmentCollection.cs
- Journaling.cs
- GridViewSelectEventArgs.cs
- CheckBoxPopupAdapter.cs
- BitmapEffectDrawing.cs
- CodeAttributeArgumentCollection.cs
- DataGridViewCellStyle.cs
- COM2PropertyPageUITypeConverter.cs
- RequestQueue.cs
- DataGridViewRowCancelEventArgs.cs
- ArgumentValidation.cs
- ObjectNavigationPropertyMapping.cs
- MetadataArtifactLoaderComposite.cs
- TextTreeRootTextBlock.cs
- InstanceStoreQueryResult.cs
- Touch.cs
- UInt64.cs
- SimpleTypeResolver.cs
- EntityClassGenerator.cs
- WindowsFormsHostPropertyMap.cs
- RegexRunnerFactory.cs
- LinqDataSourceSelectEventArgs.cs
- GridViewSortEventArgs.cs
- TransformDescriptor.cs
- Vector3DAnimationBase.cs
- FactoryGenerator.cs
- SubclassTypeValidatorAttribute.cs
- FreezableDefaultValueFactory.cs
- ScriptResourceAttribute.cs
- _NegotiateClient.cs
- ColorInterpolationModeValidation.cs
- SystemColorTracker.cs
- WebPartConnectionsCancelVerb.cs
- RawContentTypeMapper.cs
- HttpListenerPrefixCollection.cs
- LOSFormatter.cs
- PointConverter.cs
- SvcMapFileLoader.cs
- ProgressBar.cs
- StateElement.cs
- SignedXmlDebugLog.cs
- XamlStream.cs
- StrongNamePublicKeyBlob.cs
- DataServiceQueryProvider.cs
- Graphics.cs
- streamingZipPartStream.cs
- LogPolicy.cs
- XmlNamedNodeMap.cs
- IsolatedStorageException.cs
- InternalEnumValidatorAttribute.cs
- QueryCacheEntry.cs
- ContentType.cs
- DrawingContextDrawingContextWalker.cs
- QilExpression.cs
- MergePropertyDescriptor.cs
- EntityCommandDefinition.cs
- KeyValueInternalCollection.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- TrustManager.cs
- FactoryMaker.cs
- LayoutTable.cs
- CultureTableRecord.cs
- SchemaCollectionCompiler.cs
- JsonUriDataContract.cs
- DeclarativeCatalogPart.cs
- ConnectionProviderAttribute.cs
- TraceContextRecord.cs
- WindowsGraphicsWrapper.cs
- AnimationTimeline.cs
- CanonicalizationDriver.cs
- InfiniteTimeSpanConverter.cs
- ErrorRuntimeConfig.cs
- pingexception.cs
- PeerApplication.cs
- PartialCachingControl.cs
- Rights.cs
- WebPartTransformer.cs
- securitycriticaldataClass.cs
- TypedTableBase.cs
- HostUtils.cs
- DataSourceControl.cs
- Identifier.cs
- MarshalByValueComponent.cs
- FunctionQuery.cs
- OutKeywords.cs
- EncodingDataItem.cs
- SessionIDManager.cs
- ViewCellSlot.cs
- Symbol.cs
- UnmanagedMarshal.cs
- WebEventCodes.cs
- BaseCAMarshaler.cs
- AuditLogLocation.cs
- IpcClientChannel.cs