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
- StyleCollection.cs
- DisposableCollectionWrapper.cs
- OdbcEnvironmentHandle.cs
- UnmanagedMemoryStreamWrapper.cs
- FileDialogCustomPlacesCollection.cs
- WebControlsSection.cs
- ContainerUIElement3D.cs
- ToolStripStatusLabel.cs
- TextBox.cs
- AccessorTable.cs
- MarkupExtensionParser.cs
- BreakRecordTable.cs
- SqlFacetAttribute.cs
- OlePropertyStructs.cs
- GradientStop.cs
- PathSegment.cs
- WaitHandle.cs
- ClassHandlersStore.cs
- UIElementParaClient.cs
- ThrowHelper.cs
- Property.cs
- SplitterDesigner.cs
- WebPartManager.cs
- ObjectNotFoundException.cs
- ClusterUtils.cs
- OptionalColumn.cs
- Root.cs
- ActivatedMessageQueue.cs
- SecurityTokenParameters.cs
- PasswordBox.cs
- ArgumentsParser.cs
- Pen.cs
- StyleBamlTreeBuilder.cs
- NetTcpSecurity.cs
- Parser.cs
- ValidateNames.cs
- EncoderFallback.cs
- TrackingParameters.cs
- MessageEncoder.cs
- NumericExpr.cs
- ValidatorCollection.cs
- HttpCachePolicy.cs
- FontEmbeddingManager.cs
- SamlAttribute.cs
- PreservationFileReader.cs
- XLinq.cs
- WebConfigurationHostFileChange.cs
- DoubleStorage.cs
- CharConverter.cs
- OdbcInfoMessageEvent.cs
- MemoryFailPoint.cs
- RegionIterator.cs
- CombinedTcpChannel.cs
- DependencyPropertyChangedEventArgs.cs
- x509utils.cs
- TransactionContextManager.cs
- UserNamePasswordValidator.cs
- HttpHandlerActionCollection.cs
- MenuStrip.cs
- EnterpriseServicesHelper.cs
- WorkflowInstanceProxy.cs
- StorageTypeMapping.cs
- Operators.cs
- DesignerDataView.cs
- PropertyDescriptor.cs
- FamilyTypeface.cs
- SoapEnumAttribute.cs
- FileEnumerator.cs
- WebPartPersonalization.cs
- FileLogRecordStream.cs
- ButtonChrome.cs
- TextTreeFixupNode.cs
- TreeNodeBindingCollection.cs
- SignatureHelper.cs
- DynamicMetaObject.cs
- DashStyles.cs
- HostingEnvironment.cs
- GeneralTransform3DTo2DTo3D.cs
- DictionaryBase.cs
- AppSettingsExpressionBuilder.cs
- XmlWhitespace.cs
- SelectionItemPattern.cs
- EventDescriptor.cs
- HierarchicalDataBoundControl.cs
- BindingMemberInfo.cs
- SyndicationDeserializer.cs
- CalendarDesigner.cs
- ActivatedMessageQueue.cs
- Wildcard.cs
- BitmapSizeOptions.cs
- XmlElementList.cs
- QueryIntervalOp.cs
- HttpHandlerActionCollection.cs
- GeneratedContractType.cs
- LoadedOrUnloadedOperation.cs
- PassportAuthentication.cs
- WebControl.cs
- ApplicationDirectory.cs
- PerformanceCounterPermissionEntry.cs
- GetPageNumberCompletedEventArgs.cs