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
- BigInt.cs
- GPRECTF.cs
- MetabaseSettings.cs
- ApplicationInfo.cs
- MatrixAnimationUsingKeyFrames.cs
- FullTrustAssembly.cs
- Transform3D.cs
- CellTreeNode.cs
- StateMachine.cs
- ComUdtElement.cs
- AssemblyBuilder.cs
- DataTemplateKey.cs
- precedingquery.cs
- URLString.cs
- Attribute.cs
- Configuration.cs
- InkCanvasFeedbackAdorner.cs
- TimeSpanValidatorAttribute.cs
- MediaContext.cs
- TracingConnectionInitiator.cs
- NativeMethods.cs
- SortKey.cs
- ThemeDirectoryCompiler.cs
- EventWaitHandle.cs
- DrawingContextDrawingContextWalker.cs
- HitTestWithGeometryDrawingContextWalker.cs
- Color.cs
- VirtualDirectoryMappingCollection.cs
- StateWorkerRequest.cs
- PeerCustomResolverSettings.cs
- RoutedEventConverter.cs
- WorkflowControlEndpoint.cs
- SQLDoubleStorage.cs
- CloudCollection.cs
- SynchronizationContext.cs
- FileResponseElement.cs
- DbConnectionInternal.cs
- PolyBezierSegmentFigureLogic.cs
- AndCondition.cs
- Lasso.cs
- WebPartAddingEventArgs.cs
- SecurityKeyIdentifier.cs
- ExtensionCollection.cs
- Single.cs
- TemplateControl.cs
- LocalizationCodeDomSerializer.cs
- ActivityBindForm.cs
- ImpersonateTokenRef.cs
- OperatingSystem.cs
- StreamGeometryContext.cs
- PackUriHelper.cs
- UnauthorizedWebPart.cs
- DocumentCollection.cs
- TrackingRecordPreFilter.cs
- IdnMapping.cs
- LockCookie.cs
- NotSupportedException.cs
- XmlSerializerSection.cs
- DataColumnChangeEvent.cs
- MonthChangedEventArgs.cs
- UrlAuthFailedErrorFormatter.cs
- TextEditorParagraphs.cs
- MD5.cs
- SqlBuffer.cs
- CompiledQuery.cs
- FontDifferentiator.cs
- WebPartPersonalization.cs
- AttachedProperty.cs
- ZoneLinkButton.cs
- AttributeUsageAttribute.cs
- Brush.cs
- SchemaNotation.cs
- RecipientInfo.cs
- ContentType.cs
- XmlSerializerAssemblyAttribute.cs
- XamlTemplateSerializer.cs
- ColumnCollection.cs
- EntryIndex.cs
- CallSiteBinder.cs
- URLIdentityPermission.cs
- NumericUpDownAcceleration.cs
- ConfigXmlCDataSection.cs
- ElementNotAvailableException.cs
- xml.cs
- columnmapkeybuilder.cs
- ClassImporter.cs
- DynamicField.cs
- MimeTypeMapper.cs
- BaseHashHelper.cs
- KeyToListMap.cs
- DirectoryNotFoundException.cs
- SafeRightsManagementQueryHandle.cs
- SqlBuffer.cs
- PackageProperties.cs
- Serializer.cs
- CannotUnloadAppDomainException.cs
- GenericPrincipal.cs
- BinaryFormatterSinks.cs
- Console.cs
- Validator.cs