Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SemaphoreFullException.cs
- HtmlProps.cs
- SqlCachedBuffer.cs
- Set.cs
- WindowsRichEditRange.cs
- CodeGeneratorOptions.cs
- BooleanStorage.cs
- DbProviderServices.cs
- Delay.cs
- SQLString.cs
- RuleProcessor.cs
- SmtpNegotiateAuthenticationModule.cs
- GeneralTransform2DTo3D.cs
- precedingquery.cs
- BindingExpression.cs
- RegexMatch.cs
- WorkflowQueue.cs
- MarshalByValueComponent.cs
- BaseInfoTable.cs
- TrustLevel.cs
- DynamicContractTypeBuilder.cs
- RegexParser.cs
- x509utils.cs
- InputLanguageEventArgs.cs
- ViewUtilities.cs
- TerminatorSinks.cs
- ContainerCodeDomSerializer.cs
- ClickablePoint.cs
- RuntimeConfigLKG.cs
- Timer.cs
- XPathAxisIterator.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ManualResetEvent.cs
- ToolStripButton.cs
- FormViewModeEventArgs.cs
- PackWebRequestFactory.cs
- ExtendedProtectionPolicy.cs
- ClientSettingsStore.cs
- OdbcCommand.cs
- PointAnimationUsingKeyFrames.cs
- RecommendedAsConfigurableAttribute.cs
- odbcmetadatacollectionnames.cs
- DataViewSetting.cs
- HandlerFactoryCache.cs
- DataRowCollection.cs
- StatusBarAutomationPeer.cs
- DataKey.cs
- XmlSiteMapProvider.cs
- AuthenticationConfig.cs
- XmlSignificantWhitespace.cs
- ObjectConverter.cs
- DataGridViewTextBoxCell.cs
- VisualTreeUtils.cs
- TraceSwitch.cs
- DeviceContexts.cs
- webbrowsersite.cs
- XamlFilter.cs
- TabControlAutomationPeer.cs
- ServiceParser.cs
- WebPartConnectionsEventArgs.cs
- CookieProtection.cs
- graph.cs
- CategoryNameCollection.cs
- PlainXmlSerializer.cs
- DisplayNameAttribute.cs
- RetrieveVirtualItemEventArgs.cs
- ServiceHostingEnvironmentSection.cs
- ControlsConfig.cs
- TypeReference.cs
- QualifiedCellIdBoolean.cs
- SByteConverter.cs
- OLEDB_Util.cs
- ContractSearchPattern.cs
- UInt64.cs
- _SSPIWrapper.cs
- LinkButton.cs
- Compress.cs
- DbConnectionStringCommon.cs
- SQLByteStorage.cs
- rsa.cs
- ListViewInsertionMark.cs
- TypeUtil.cs
- EffectiveValueEntry.cs
- EastAsianLunisolarCalendar.cs
- ProcessingInstructionAction.cs
- DataSourceGeneratorException.cs
- UrlAuthorizationModule.cs
- HtmlInputCheckBox.cs
- Queue.cs
- Size3D.cs
- BitStream.cs
- DropSource.cs
- ValueUnavailableException.cs
- AttributeCollection.cs
- webbrowsersite.cs
- Span.cs
- SessionStateItemCollection.cs
- RtfToXamlReader.cs
- SqlError.cs
- TextSpanModifier.cs