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
- FactoryRecord.cs
- SqlParameterCollection.cs
- ElementNotAvailableException.cs
- ConfigXmlCDataSection.cs
- ScrollData.cs
- WindowsSysHeader.cs
- RemotingClientProxy.cs
- Link.cs
- FilePrompt.cs
- SiteMapHierarchicalDataSourceView.cs
- SafeHandles.cs
- WindowsComboBox.cs
- DataGridItemEventArgs.cs
- AttachedAnnotation.cs
- StringWriter.cs
- XmlEnumAttribute.cs
- SiblingIterators.cs
- MethodBuilder.cs
- EntityClassGenerator.cs
- SQLDecimal.cs
- StrongTypingException.cs
- OdbcUtils.cs
- XmlSchemaChoice.cs
- HttpApplicationStateWrapper.cs
- NameGenerator.cs
- HtmlDocument.cs
- ObjectComplexPropertyMapping.cs
- CqlLexer.cs
- TableLayoutColumnStyleCollection.cs
- ValidationHelpers.cs
- _HeaderInfo.cs
- OpenTypeCommon.cs
- DefaultPrintController.cs
- Multiply.cs
- QilIterator.cs
- ChtmlTextWriter.cs
- FileDialog_Vista_Interop.cs
- DisposableCollectionWrapper.cs
- dbdatarecord.cs
- SwitchAttribute.cs
- TypeUnloadedException.cs
- parserscommon.cs
- FunctionDescription.cs
- RSAOAEPKeyExchangeDeformatter.cs
- BindingMAnagerBase.cs
- RoleManagerModule.cs
- CompressEmulationStream.cs
- ContextQuery.cs
- NgenServicingAttributes.cs
- DynamicValueConverter.cs
- ListViewUpdatedEventArgs.cs
- SemanticAnalyzer.cs
- QuaternionConverter.cs
- ServiceMetadataExtension.cs
- RecordsAffectedEventArgs.cs
- DSASignatureFormatter.cs
- Image.cs
- AnnotationObservableCollection.cs
- PolyBezierSegment.cs
- ViewStateException.cs
- _ConnectionGroup.cs
- PersonalizationEntry.cs
- SortQuery.cs
- PropertyTabAttribute.cs
- ResizingMessageFilter.cs
- SafeViewOfFileHandle.cs
- CharacterMetrics.cs
- ToolStripItemTextRenderEventArgs.cs
- NonClientArea.cs
- ToolStripItemGlyph.cs
- Slider.cs
- PrimaryKeyTypeConverter.cs
- HotSpot.cs
- TraceHandlerErrorFormatter.cs
- ElementAtQueryOperator.cs
- SQLMembershipProvider.cs
- CodeCastExpression.cs
- BuildProvider.cs
- filewebrequest.cs
- RenderOptions.cs
- BaseServiceProvider.cs
- GenericRootAutomationPeer.cs
- SerializationInfoEnumerator.cs
- SizeConverter.cs
- ToolStripItemTextRenderEventArgs.cs
- ipaddressinformationcollection.cs
- RuleSettings.cs
- XamlGridLengthSerializer.cs
- ControlBindingsCollection.cs
- HttpCapabilitiesBase.cs
- loginstatus.cs
- LinqToSqlWrapper.cs
- AnnotationResourceCollection.cs
- PropertyValue.cs
- QuaternionValueSerializer.cs
- Model3D.cs
- EdgeModeValidation.cs
- AllMembershipCondition.cs
- RectValueSerializer.cs
- ContainerUtilities.cs