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
- FileController.cs
- FaultFormatter.cs
- ChildTable.cs
- TraceSwitch.cs
- VirtualPath.cs
- Calendar.cs
- ArgumentReference.cs
- XmlImplementation.cs
- SvcMapFileSerializer.cs
- TextContainerChangeEventArgs.cs
- Vector3DAnimation.cs
- SerializationInfo.cs
- CommandSet.cs
- TextChange.cs
- VersionPair.cs
- COM2IDispatchConverter.cs
- PriorityQueue.cs
- ColumnMapTranslator.cs
- FrameworkElementFactoryMarkupObject.cs
- BindingList.cs
- SerializationAttributes.cs
- TraceLevelStore.cs
- TemplateBindingExpression.cs
- RegisteredScript.cs
- SerializationSectionGroup.cs
- GlobalizationAssembly.cs
- BlurEffect.cs
- DaylightTime.cs
- ScrollPatternIdentifiers.cs
- Blend.cs
- SHA256Managed.cs
- DataFormat.cs
- RowToParametersTransformer.cs
- ClockController.cs
- ActionItem.cs
- RotateTransform3D.cs
- SpellerInterop.cs
- SmtpNetworkElement.cs
- ControllableStoryboardAction.cs
- CancellationHandlerDesigner.cs
- BufferedStream2.cs
- CounterCreationDataCollection.cs
- OrderToken.cs
- TextDecorationCollectionConverter.cs
- ContentElement.cs
- ExpressionBuilder.cs
- Brush.cs
- PointCollection.cs
- AuthenticationModulesSection.cs
- DataGridViewColumnConverter.cs
- COM2ExtendedTypeConverter.cs
- XMLUtil.cs
- CellTreeNodeVisitors.cs
- ParameterRetriever.cs
- EmptyCollection.cs
- SqlPersonalizationProvider.cs
- VersionedStreamOwner.cs
- CodeCommentStatement.cs
- ToolStripTextBox.cs
- SqlServer2KCompatibilityCheck.cs
- BadImageFormatException.cs
- ControlAdapter.cs
- ColorIndependentAnimationStorage.cs
- DataPagerFieldCollection.cs
- SapiAttributeParser.cs
- CompositionAdorner.cs
- XmlEventCache.cs
- ProcessHostMapPath.cs
- TransformerInfoCollection.cs
- PackWebRequestFactory.cs
- MediaPlayer.cs
- FixedTextSelectionProcessor.cs
- ProfessionalColors.cs
- ThreadSafeList.cs
- SystemWebExtensionsSectionGroup.cs
- IgnoreDataMemberAttribute.cs
- RetrieveVirtualItemEventArgs.cs
- RequestReplyCorrelator.cs
- XmlAttributeAttribute.cs
- URLMembershipCondition.cs
- BindableTemplateBuilder.cs
- ProxyWebPartManager.cs
- StorageTypeMapping.cs
- RadioButtonRenderer.cs
- HotCommands.cs
- hwndwrapper.cs
- BitmapCodecInfoInternal.cs
- GroupLabel.cs
- CodeBlockBuilder.cs
- ObjectCloneHelper.cs
- Avt.cs
- DataGridViewSelectedColumnCollection.cs
- MULTI_QI.cs
- InstanceLockLostException.cs
- TrackingValidationObjectDictionary.cs
- IriParsingElement.cs
- RepeatButton.cs
- HttpPostedFileWrapper.cs
- HuffCodec.cs
- RectConverter.cs