Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / Dom / XmlDomTextWriter.cs / 1305376 / XmlDomTextWriter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System; using System.IO; using System.Text; using System.Runtime.Versioning; // 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 ) { } [ResourceConsumption(ResourceScope.Machine)] [ResourceExposure(ResourceScope.Machine)] 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; using System.Runtime.Versioning; // 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 ) { } [ResourceConsumption(ResourceScope.Machine)] [ResourceExposure(ResourceScope.Machine)] 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
- _FixedSizeReader.cs
- baseaxisquery.cs
- Tokenizer.cs
- ParallelEnumerableWrapper.cs
- Converter.cs
- EndpointDiscoveryMetadata11.cs
- XmlWrappingReader.cs
- SystemTcpConnection.cs
- GeneratedCodeAttribute.cs
- FrameworkPropertyMetadata.cs
- rsa.cs
- PlaceHolder.cs
- SiteMapDataSourceView.cs
- GroupQuery.cs
- FontFamilyValueSerializer.cs
- NotFiniteNumberException.cs
- SignatureDescription.cs
- Menu.cs
- DataGrid.cs
- MasterPage.cs
- TypeElement.cs
- _UncName.cs
- XmlDataSourceNodeDescriptor.cs
- FamilyCollection.cs
- PersonalizationStateInfo.cs
- ScriptingSectionGroup.cs
- CodePrimitiveExpression.cs
- InfoCardSymmetricCrypto.cs
- SharedDp.cs
- RelatedImageListAttribute.cs
- MouseBinding.cs
- SiteMapNodeItem.cs
- WebPartTracker.cs
- HttpContextServiceHost.cs
- StrongName.cs
- Function.cs
- EnumValAlphaComparer.cs
- CompilerScope.cs
- Reference.cs
- DocumentOrderQuery.cs
- AsyncCallback.cs
- StylusPoint.cs
- DirectionalLight.cs
- PTUtility.cs
- ConfigurationConverterBase.cs
- FontResourceCache.cs
- DocumentPaginator.cs
- RemotingAttributes.cs
- ExpressionBuilderCollection.cs
- ResolvedKeyFrameEntry.cs
- CheckBoxList.cs
- METAHEADER.cs
- AmbientProperties.cs
- TargetInvocationException.cs
- TemplateBindingExpression.cs
- WebPartDescription.cs
- CompilationSection.cs
- XmlFileEditor.cs
- XsdCachingReader.cs
- WebSysDisplayNameAttribute.cs
- OutputCacheSettingsSection.cs
- BindingCollection.cs
- PhysicalAddress.cs
- Vector.cs
- DataGridViewAutoSizeModeEventArgs.cs
- CaseInsensitiveOrdinalStringComparer.cs
- WebControl.cs
- ConditionalAttribute.cs
- SslStream.cs
- KerberosSecurityTokenProvider.cs
- WindowsListViewItem.cs
- WindowsListViewItemCheckBox.cs
- RawKeyboardInputReport.cs
- PersonalizationState.cs
- SqlRowUpdatedEvent.cs
- HtmlAnchor.cs
- WebFormsRootDesigner.cs
- RelatedView.cs
- PeerCollaborationPermission.cs
- WindowsFormsLinkLabel.cs
- SmtpAuthenticationManager.cs
- AggregateNode.cs
- DiscoveryServiceExtension.cs
- NonBatchDirectoryCompiler.cs
- WmlValidationSummaryAdapter.cs
- FillErrorEventArgs.cs
- ApplicationInfo.cs
- ValueTypeFixupInfo.cs
- XmlWriterSettings.cs
- SynchronizationLockException.cs
- BufferedWebEventProvider.cs
- GeneralTransform2DTo3D.cs
- Function.cs
- dataprotectionpermission.cs
- CachedBitmap.cs
- TextElementCollectionHelper.cs
- WizardStepCollectionEditor.cs
- HTMLTagNameToTypeMapper.cs
- DataTableCollection.cs
- RequiredAttributeAttribute.cs