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
- WarningException.cs
- control.ime.cs
- PcmConverter.cs
- Char.cs
- DesignerDataParameter.cs
- HtmlPhoneCallAdapter.cs
- TableLayoutColumnStyleCollection.cs
- ServerTooBusyException.cs
- HtmlControlPersistable.cs
- FramingChannels.cs
- InstanceData.cs
- SubMenuStyle.cs
- StylusEditingBehavior.cs
- SemaphoreSecurity.cs
- JsonReaderWriterFactory.cs
- StylusEditingBehavior.cs
- ApplyImportsAction.cs
- SendKeys.cs
- DbProviderFactory.cs
- ReflectionPermission.cs
- TripleDES.cs
- WebPartConnectVerb.cs
- SmtpNtlmAuthenticationModule.cs
- GlyphRun.cs
- PolicyValidator.cs
- GridEntry.cs
- ToolStripOverflowButton.cs
- ListItemCollection.cs
- ListChunk.cs
- InkCanvas.cs
- LinkArea.cs
- DebugInfoExpression.cs
- ObjectCloneHelper.cs
- XmlLinkedNode.cs
- ScriptRef.cs
- TextEffectResolver.cs
- OleDbPropertySetGuid.cs
- BufferManager.cs
- InvokeBinder.cs
- _RequestCacheProtocol.cs
- WebBrowserContainer.cs
- LassoSelectionBehavior.cs
- Transform3DGroup.cs
- PtsCache.cs
- SubqueryRules.cs
- ObjectAnimationBase.cs
- EntitySqlQueryBuilder.cs
- LocationChangedEventArgs.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ApplicationId.cs
- TableChangeProcessor.cs
- GestureRecognitionResult.cs
- ApplicationInterop.cs
- ZipIOFileItemStream.cs
- InvalidProgramException.cs
- CustomMenuItemCollection.cs
- DataTableReader.cs
- ReflectPropertyDescriptor.cs
- MessageQueueKey.cs
- XmlDocument.cs
- LassoSelectionBehavior.cs
- Help.cs
- GPPOINT.cs
- UncommonField.cs
- SamlSubject.cs
- SqlRecordBuffer.cs
- TypeConstant.cs
- HwndPanningFeedback.cs
- FixedFindEngine.cs
- Stack.cs
- WasAdminWrapper.cs
- HtmlDocument.cs
- AutoScrollExpandMessageFilter.cs
- Int64Animation.cs
- PersonalizationProviderHelper.cs
- MsmqIntegrationOutputChannel.cs
- SocketCache.cs
- MatrixAnimationBase.cs
- MediaTimeline.cs
- EntityDataSourceMemberPath.cs
- ObjectDataSourceMethodEventArgs.cs
- cookie.cs
- AuthorizationRuleCollection.cs
- ReflectTypeDescriptionProvider.cs
- QilList.cs
- TableHeaderCell.cs
- HostProtectionException.cs
- DesignSurfaceManager.cs
- TextEditorTables.cs
- ToolboxDataAttribute.cs
- SubstitutionResponseElement.cs
- BrushMappingModeValidation.cs
- _SafeNetHandles.cs
- QueryResponse.cs
- SapiRecoInterop.cs
- _ServiceNameStore.cs
- OleDbConnectionFactory.cs
- ServerIdentity.cs
- DataRecord.cs
- TaiwanCalendar.cs