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
- HandlerMappingMemo.cs
- SqlXml.cs
- PageThemeCodeDomTreeGenerator.cs
- InternalPermissions.cs
- FixedTextContainer.cs
- GroupItem.cs
- CellLabel.cs
- SymmetricCryptoHandle.cs
- EmptyQuery.cs
- ClientFormsAuthenticationCredentials.cs
- ModifyActivitiesPropertyDescriptor.cs
- ResourceExpressionBuilder.cs
- KeyProperty.cs
- HttpRequestCacheValidator.cs
- RelationshipDetailsRow.cs
- JsonServiceDocumentSerializer.cs
- EasingKeyFrames.cs
- ToolStripItemImageRenderEventArgs.cs
- ClientBuildManager.cs
- unsafenativemethodstextservices.cs
- ReadWriteObjectLock.cs
- SafeUserTokenHandle.cs
- AccessibleObject.cs
- _TransmitFileOverlappedAsyncResult.cs
- WebPartHelpVerb.cs
- GenericUriParser.cs
- WSFederationHttpBinding.cs
- JpegBitmapDecoder.cs
- InkCanvasSelectionAdorner.cs
- BatchParser.cs
- SAPIEngineTypes.cs
- DataSourceHelper.cs
- ContextStaticAttribute.cs
- StoragePropertyMapping.cs
- Debug.cs
- CodeGeneratorAttribute.cs
- CodeGenerator.cs
- PnrpPermission.cs
- TextServicesLoader.cs
- SQLStringStorage.cs
- CanonicalFontFamilyReference.cs
- RegionIterator.cs
- HwndKeyboardInputProvider.cs
- ServerIdentity.cs
- Win32.cs
- MaskInputRejectedEventArgs.cs
- TextElementEnumerator.cs
- DbException.cs
- _HelperAsyncResults.cs
- Variable.cs
- InvalidFilterCriteriaException.cs
- ThousandthOfEmRealDoubles.cs
- XmlSchemaDocumentation.cs
- Graphics.cs
- MediaElementAutomationPeer.cs
- UserNameSecurityTokenAuthenticator.cs
- DeflateStream.cs
- BeginEvent.cs
- PageContent.cs
- cookie.cs
- WebDescriptionAttribute.cs
- COM2ComponentEditor.cs
- TokenizerHelper.cs
- IMembershipProvider.cs
- DataSetUtil.cs
- GetPageCompletedEventArgs.cs
- TypeExtensionConverter.cs
- Task.cs
- AutomationPatternInfo.cs
- DataServiceCollectionOfT.cs
- FontNamesConverter.cs
- StylusButtonEventArgs.cs
- ExpandSegment.cs
- OpenTypeLayoutCache.cs
- QilNode.cs
- ObjectResult.cs
- TextView.cs
- AmbientLight.cs
- TypedMessageConverter.cs
- EventWaitHandle.cs
- DataDocumentXPathNavigator.cs
- Interlocked.cs
- EntityDataSourceContextCreatingEventArgs.cs
- XmlChoiceIdentifierAttribute.cs
- GlyphManager.cs
- XmlUtf8RawTextWriter.cs
- PackagePart.cs
- ConcurrentQueue.cs
- ValidationEventArgs.cs
- ParentUndoUnit.cs
- OrderPreservingPipeliningSpoolingTask.cs
- WebColorConverter.cs
- DbReferenceCollection.cs
- TextCollapsingProperties.cs
- PageTheme.cs
- HostedElements.cs
- MultilineStringConverter.cs
- CommonDialog.cs
- RemoteArgument.cs
- StringValueConverter.cs