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
- XmlNamespaceManager.cs
- _HeaderInfo.cs
- RegexStringValidator.cs
- SettingsProperty.cs
- QueryTaskGroupState.cs
- EntryWrittenEventArgs.cs
- DataBoundLiteralControl.cs
- DrawListViewSubItemEventArgs.cs
- XmlJsonReader.cs
- PeerNameRecord.cs
- SeekStoryboard.cs
- TextEvent.cs
- PropertyRef.cs
- ConstraintConverter.cs
- TextElement.cs
- HostedHttpRequestAsyncResult.cs
- Viewport3DVisual.cs
- AutoCompleteStringCollection.cs
- StubHelpers.cs
- UDPClient.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- FormsAuthenticationUser.cs
- Util.cs
- DataContractSerializerOperationGenerator.cs
- ParameterToken.cs
- WeakReadOnlyCollection.cs
- SamlConditions.cs
- ValidationErrorEventArgs.cs
- DependencyProperty.cs
- TemplatedWizardStep.cs
- SchemaType.cs
- SettingsSavedEventArgs.cs
- DoubleLinkListEnumerator.cs
- CqlParserHelpers.cs
- ColumnMapCopier.cs
- Command.cs
- SymbolEqualComparer.cs
- TdsParserHelperClasses.cs
- ResourceProperty.cs
- GridItemCollection.cs
- ExecutionTracker.cs
- AutomationTextAttribute.cs
- DecoderReplacementFallback.cs
- PersonalizablePropertyEntry.cs
- SpStreamWrapper.cs
- LiteralLink.cs
- Polygon.cs
- TokenBasedSetEnumerator.cs
- CaseInsensitiveComparer.cs
- wgx_commands.cs
- ToolZone.cs
- X509CertificateInitiatorServiceCredential.cs
- InputLanguageEventArgs.cs
- GeneralTransform3DGroup.cs
- NativeStructs.cs
- WindowsRebar.cs
- ToolStripItemClickedEventArgs.cs
- ElementHostAutomationPeer.cs
- WindowsPen.cs
- ContextMenuService.cs
- LogicalTreeHelper.cs
- CompressedStack.cs
- COM2FontConverter.cs
- ConfigurationPropertyCollection.cs
- ServiceAppDomainAssociationProvider.cs
- DecoderNLS.cs
- StrongNameIdentityPermission.cs
- ConstrainedDataObject.cs
- Root.cs
- DbConnectionPoolOptions.cs
- NamedPipeHostedTransportConfiguration.cs
- CqlWriter.cs
- TextTabProperties.cs
- CompilerScopeManager.cs
- DbConnectionPoolCounters.cs
- RepeatButtonAutomationPeer.cs
- SqlDataSourceCache.cs
- SettingsSavedEventArgs.cs
- DbConnectionPoolGroup.cs
- Stroke2.cs
- ScopeCollection.cs
- FillBehavior.cs
- TrustLevelCollection.cs
- DbException.cs
- _Rfc2616CacheValidators.cs
- ImageBrush.cs
- IIS7WorkerRequest.cs
- WebPartVerb.cs
- WeakHashtable.cs
- MetadataItemEmitter.cs
- GregorianCalendarHelper.cs
- XsdDuration.cs
- PropertyManager.cs
- CreateUserWizardStep.cs
- EdmProperty.cs
- DataServiceQueryOfT.cs
- FixedSOMTableRow.cs
- ControlBuilder.cs
- HttpConfigurationContext.cs
- FocusManager.cs