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
- DataGridViewComboBoxEditingControl.cs
- ListViewUpdateEventArgs.cs
- COM2Enum.cs
- EditorZone.cs
- ChangeProcessor.cs
- xmlsaver.cs
- NotifyIcon.cs
- altserialization.cs
- DecoderFallback.cs
- ComboBox.cs
- ComplexType.cs
- GridItemPatternIdentifiers.cs
- VectorAnimationUsingKeyFrames.cs
- SortAction.cs
- RightsManagementUser.cs
- SqlRecordBuffer.cs
- PageThemeParser.cs
- OneToOneMappingSerializer.cs
- SplashScreenNativeMethods.cs
- XmlSchemaSimpleType.cs
- LiteralText.cs
- EntityEntry.cs
- XmlMemberMapping.cs
- URLString.cs
- HttpClientCertificate.cs
- DataSourceProvider.cs
- XmlQueryOutput.cs
- SoundPlayer.cs
- ThemeInfoAttribute.cs
- Comparer.cs
- EntityDataSource.cs
- DataMisalignedException.cs
- AutomationEvent.cs
- _BaseOverlappedAsyncResult.cs
- DispatcherBuilder.cs
- OracleFactory.cs
- RuleInfoComparer.cs
- UTF8Encoding.cs
- FilterEventArgs.cs
- FileVersionInfo.cs
- DynamicPropertyHolder.cs
- DatatypeImplementation.cs
- HashSet.cs
- MetadataArtifactLoaderFile.cs
- Baml2006KeyRecord.cs
- ObjRef.cs
- HostingPreferredMapPath.cs
- SqlExpander.cs
- ObjectIDGenerator.cs
- XmlSchemaSimpleContentExtension.cs
- QilNode.cs
- WeakReferenceList.cs
- SchemaComplexType.cs
- TextDecoration.cs
- KnownTypesHelper.cs
- BuilderElements.cs
- HttpEncoderUtility.cs
- HtmlTable.cs
- RemotingConfiguration.cs
- HttpPostServerProtocol.cs
- PrintPreviewDialog.cs
- HttpContext.cs
- BindingExpressionBase.cs
- IncrementalCompileAnalyzer.cs
- ListBase.cs
- UnhandledExceptionEventArgs.cs
- DeadCharTextComposition.cs
- Trace.cs
- PingOptions.cs
- LocalizationComments.cs
- FloaterParagraph.cs
- SqlRowUpdatedEvent.cs
- TrustSection.cs
- ViewBase.cs
- FileVersionInfo.cs
- TransactionException.cs
- DataKey.cs
- LogAppendAsyncResult.cs
- RangeContentEnumerator.cs
- FusionWrap.cs
- BitmapImage.cs
- Binding.cs
- MethodCallConverter.cs
- Mutex.cs
- PropertyItemInternal.cs
- SqlInternalConnectionSmi.cs
- PrimitiveXmlSerializers.cs
- XmlDataSourceView.cs
- Parser.cs
- FrameSecurityDescriptor.cs
- WindowsGraphicsWrapper.cs
- oledbconnectionstring.cs
- Variant.cs
- StatusBarItem.cs
- BulletedListEventArgs.cs
- ModelUIElement3D.cs
- RetrieveVirtualItemEventArgs.cs
- ApplicationSettingsBase.cs
- Cursor.cs
- XsdDuration.cs