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
- BindingGraph.cs
- ZoneIdentityPermission.cs
- SplitterEvent.cs
- GeneratedContractType.cs
- RowUpdatingEventArgs.cs
- SimpleWorkerRequest.cs
- SolidColorBrush.cs
- WSFederationHttpBinding.cs
- MethodRental.cs
- DataGridViewRowPostPaintEventArgs.cs
- XmlSerializerFactory.cs
- CustomWebEventKey.cs
- WebPartDisplayModeCollection.cs
- AlignmentXValidation.cs
- TemplatePagerField.cs
- DrawingContext.cs
- Geometry3D.cs
- AutoGeneratedFieldProperties.cs
- SourceSwitch.cs
- SqlPersonalizationProvider.cs
- WebEvents.cs
- TextEditorTables.cs
- MouseCaptureWithinProperty.cs
- TreeIterators.cs
- MruCache.cs
- LogWriteRestartAreaState.cs
- DataGridViewCheckBoxCell.cs
- Grid.cs
- TransactionsSectionGroup.cs
- parserscommon.cs
- COM2EnumConverter.cs
- Convert.cs
- EntityDataSourceEntitySetNameItem.cs
- GlobalProxySelection.cs
- CheckPair.cs
- CleanUpVirtualizedItemEventArgs.cs
- SynchronousChannel.cs
- ZipIOExtraField.cs
- Axis.cs
- ViewStateModeByIdAttribute.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- StyleXamlTreeBuilder.cs
- StylusPointPropertyInfo.cs
- Currency.cs
- WebException.cs
- AnnotationComponentManager.cs
- DeflateStreamAsyncResult.cs
- CommandBinding.cs
- CookieHandler.cs
- PropertyFilterAttribute.cs
- RecognizerStateChangedEventArgs.cs
- MemoryMappedView.cs
- ListenerConstants.cs
- ObjectManager.cs
- InternalDispatchObject.cs
- XmlSchemaAttributeGroupRef.cs
- ProcessRequestAsyncResult.cs
- HttpGetClientProtocol.cs
- MergePropertyDescriptor.cs
- WmpBitmapDecoder.cs
- MobileResource.cs
- LineGeometry.cs
- LayoutEditorPart.cs
- QfeChecker.cs
- PromptEventArgs.cs
- StateDesigner.Helpers.cs
- DragDrop.cs
- IISUnsafeMethods.cs
- SqlRemoveConstantOrderBy.cs
- TextMarkerSource.cs
- FormViewDeletedEventArgs.cs
- FileResponseElement.cs
- CustomAttribute.cs
- DependencyPropertyHelper.cs
- XmlTextAttribute.cs
- OrderedDictionaryStateHelper.cs
- MetadataExchangeClient.cs
- _DisconnectOverlappedAsyncResult.cs
- XmlSchemaAppInfo.cs
- ClientType.cs
- FixedSOMTextRun.cs
- DataTemplate.cs
- ApplicationServiceManager.cs
- ThreadInterruptedException.cs
- Filter.cs
- DataColumnMappingCollection.cs
- PriorityBindingExpression.cs
- ExportOptions.cs
- PhysicalAddress.cs
- UIAgentCrashedException.cs
- TraceSection.cs
- HttpListenerPrefixCollection.cs
- UdpTransportBindingElement.cs
- ViewStateModeByIdAttribute.cs
- ComAdminInterfaces.cs
- UriParserTemplates.cs
- EdgeModeValidation.cs
- ReachUIElementCollectionSerializerAsync.cs
- AccessedThroughPropertyAttribute.cs
- RemotingClientProxy.cs