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
- CompressStream.cs
- PageBuildProvider.cs
- CrossSiteScriptingValidation.cs
- DependentList.cs
- NativeMethods.cs
- DataGridViewColumn.cs
- BasePropertyDescriptor.cs
- EncryptedReference.cs
- WebPartMovingEventArgs.cs
- XmlBoundElement.cs
- CapabilitiesState.cs
- ContentPresenter.cs
- SqlVisitor.cs
- SByte.cs
- ServiceReference.cs
- GridEntryCollection.cs
- Keywords.cs
- DataGridViewColumnCollection.cs
- HttpResponseInternalBase.cs
- ServiceHostFactory.cs
- EntityStoreSchemaFilterEntry.cs
- Rights.cs
- SendMailErrorEventArgs.cs
- DataGridViewToolTip.cs
- UniqueID.cs
- OutputCacheProviderCollection.cs
- CodeChecksumPragma.cs
- WithStatement.cs
- SizeAnimationBase.cs
- SchemaCollectionPreprocessor.cs
- PageThemeBuildProvider.cs
- IISUnsafeMethods.cs
- UdpDiscoveryEndpointProvider.cs
- Cursors.cs
- XmlSortKeyAccumulator.cs
- BaseDataList.cs
- PaintEvent.cs
- XmlBinaryReader.cs
- VisualBasicDesignerHelper.cs
- SqlServer2KCompatibilityAnnotation.cs
- SweepDirectionValidation.cs
- UIElement.cs
- UrlMappingCollection.cs
- TextRangeEdit.cs
- RtfFormatStack.cs
- MenuItem.cs
- ImageListDesigner.cs
- Types.cs
- BindableAttribute.cs
- ToolTipService.cs
- PngBitmapEncoder.cs
- Timer.cs
- ConsoleCancelEventArgs.cs
- SystemGatewayIPAddressInformation.cs
- MembershipPasswordException.cs
- WebPartDeleteVerb.cs
- HttpException.cs
- DefaultWorkflowLoaderService.cs
- RowParagraph.cs
- HtmlWindow.cs
- UnsafeNativeMethodsTablet.cs
- TableLayoutRowStyleCollection.cs
- NullToBooleanConverter.cs
- dataprotectionpermission.cs
- TextBoxBase.cs
- ColumnPropertiesGroup.cs
- SafeProcessHandle.cs
- FormCollection.cs
- COM2IDispatchConverter.cs
- ClonableStack.cs
- RijndaelManaged.cs
- VisualCollection.cs
- SignatureToken.cs
- ExtensionWindowResizeGrip.cs
- SoapExtensionTypeElement.cs
- Pkcs7Recipient.cs
- TimelineGroup.cs
- TemplateNameScope.cs
- MultilineStringConverter.cs
- DrawingVisual.cs
- DrawingContextDrawingContextWalker.cs
- WizardSideBarListControlItemEventArgs.cs
- XomlCompiler.cs
- QilReference.cs
- GroupAggregateExpr.cs
- ControlPaint.cs
- FunctionDescription.cs
- StatusBarItem.cs
- PasswordTextNavigator.cs
- BaseCollection.cs
- MemberInfoSerializationHolder.cs
- WindowInteractionStateTracker.cs
- FreezableDefaultValueFactory.cs
- SqlTrackingService.cs
- ListViewUpdatedEventArgs.cs
- ProcessHostServerConfig.cs
- TreeNodeMouseHoverEvent.cs
- MetadataCacheItem.cs
- XmlDigitalSignatureProcessor.cs
- AdapterDictionary.cs