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
- XmlNodeChangedEventManager.cs
- NegationPusher.cs
- DataGridColumn.cs
- DNS.cs
- VersionedStream.cs
- CodeAttributeArgumentCollection.cs
- TcpTransportSecurity.cs
- PageEventArgs.cs
- BitmapEffectInput.cs
- InkCanvasAutomationPeer.cs
- TextOutput.cs
- Border.cs
- Overlapped.cs
- XmlSchemaAny.cs
- PeerToPeerException.cs
- HttpListenerRequestTraceRecord.cs
- CqlQuery.cs
- KeyboardDevice.cs
- SharedPerformanceCounter.cs
- ButtonChrome.cs
- CodeDelegateInvokeExpression.cs
- BitmapEffectDrawing.cs
- TextTreeTextElementNode.cs
- NonceToken.cs
- QueryOptionExpression.cs
- ImpersonateTokenRef.cs
- CellPartitioner.cs
- LineVisual.cs
- VerificationAttribute.cs
- METAHEADER.cs
- Error.cs
- XdrBuilder.cs
- listitem.cs
- PriorityQueue.cs
- Merger.cs
- TypeBinaryExpression.cs
- NotifyParentPropertyAttribute.cs
- HttpFileCollection.cs
- ListViewItemMouseHoverEvent.cs
- SocketAddress.cs
- DataGridColumn.cs
- DataAdapter.cs
- SqlDataSourceSelectingEventArgs.cs
- Compiler.cs
- _ProxyRegBlob.cs
- Clock.cs
- AncillaryOps.cs
- ImageButton.cs
- PeerEndPoint.cs
- COM2FontConverter.cs
- ping.cs
- ToolStripHighContrastRenderer.cs
- DependencyPropertyConverter.cs
- GridViewUpdatedEventArgs.cs
- ResourceProviderFactory.cs
- input.cs
- PageThemeBuildProvider.cs
- RightsManagementEncryptionTransform.cs
- ParameterEditorUserControl.cs
- TransformDescriptor.cs
- VersionPair.cs
- _ListenerAsyncResult.cs
- ColorMap.cs
- OracleTransaction.cs
- RuntimeArgumentHandle.cs
- CodeDefaultValueExpression.cs
- NullRuntimeConfig.cs
- BypassElementCollection.cs
- XmlSchemaDocumentation.cs
- ConfigurationPropertyAttribute.cs
- UrlMappingsSection.cs
- WebPartConnectionsCancelEventArgs.cs
- JsonDataContract.cs
- FrameworkTemplate.cs
- NavigationService.cs
- KeyGestureConverter.cs
- IApplicationTrustManager.cs
- HMACMD5.cs
- TrustManagerPromptUI.cs
- SqlNode.cs
- StrokeDescriptor.cs
- InputScopeNameConverter.cs
- RewritingSimplifier.cs
- CodeParameterDeclarationExpressionCollection.cs
- NamedObject.cs
- NavigationExpr.cs
- HMACSHA512.cs
- JsonXmlDataContract.cs
- LinearQuaternionKeyFrame.cs
- WindowsListViewGroup.cs
- FlowLayout.cs
- Tracking.cs
- TiffBitmapDecoder.cs
- LogicalCallContext.cs
- ThreadAbortException.cs
- TextBlock.cs
- SafeFindHandle.cs
- CqlIdentifiers.cs
- MemoryMappedViewAccessor.cs
- GridEntryCollection.cs