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
- TraceContext.cs
- DataRowExtensions.cs
- BinaryCommonClasses.cs
- StoreItemCollection.cs
- ParseHttpDate.cs
- BitmapEffectInput.cs
- XsdSchemaFileEditor.cs
- DecimalAnimationUsingKeyFrames.cs
- ServiceDebugBehavior.cs
- ScriptReference.cs
- TreeBuilder.cs
- DynamicValidator.cs
- InputScopeConverter.cs
- ItemsChangedEventArgs.cs
- Parameter.cs
- ReachObjectContext.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- GlyphElement.cs
- BaseCollection.cs
- DBCommandBuilder.cs
- ListBox.cs
- EnumDataContract.cs
- SegmentTree.cs
- SystemWebSectionGroup.cs
- ListView.cs
- ObjectViewListener.cs
- PlainXmlWriter.cs
- CodeCompileUnit.cs
- KeySplineConverter.cs
- CustomWebEventKey.cs
- DataRelation.cs
- RectangleGeometry.cs
- WebBrowserDocumentCompletedEventHandler.cs
- ConfigurationSectionGroupCollection.cs
- FtpWebRequest.cs
- HiddenField.cs
- URL.cs
- WebPartHeaderCloseVerb.cs
- UIntPtr.cs
- TemplateControlParser.cs
- AuthStoreRoleProvider.cs
- InitializationEventAttribute.cs
- ArgumentNullException.cs
- StringAnimationUsingKeyFrames.cs
- SystemResourceKey.cs
- SafeBitVector32.cs
- Decorator.cs
- PortCache.cs
- BindStream.cs
- CapabilitiesPattern.cs
- WindowsNonControl.cs
- DynamicControl.cs
- ResourceAttributes.cs
- __FastResourceComparer.cs
- BitmapSourceSafeMILHandle.cs
- RefreshPropertiesAttribute.cs
- WebServiceClientProxyGenerator.cs
- AdornerPresentationContext.cs
- DataGridViewColumnCollection.cs
- EventMap.cs
- ControlPaint.cs
- CatalogZoneBase.cs
- TypeBuilder.cs
- TextEditorTables.cs
- FloaterBaseParagraph.cs
- WorkflowServiceHostFactory.cs
- XmlObjectSerializerContext.cs
- InstanceDescriptor.cs
- SqlBulkCopyColumnMapping.cs
- GeneralTransformGroup.cs
- ExpandSegment.cs
- CounterCreationDataCollection.cs
- SqlFacetAttribute.cs
- dbenumerator.cs
- DefaultAsyncDataDispatcher.cs
- DataGridViewComboBoxColumn.cs
- _RequestCacheProtocol.cs
- RegexWriter.cs
- IndicFontClient.cs
- AccessText.cs
- SocketAddress.cs
- XmlSchemaCollection.cs
- NetTcpSectionData.cs
- ListViewSortEventArgs.cs
- HGlobalSafeHandle.cs
- DbBuffer.cs
- FixedMaxHeap.cs
- Expander.cs
- ResXDataNode.cs
- NewArrayExpression.cs
- WpfKnownMemberInvoker.cs
- FixedDocumentPaginator.cs
- SiteMapPath.cs
- DifferencingCollection.cs
- InvalidCastException.cs
- MessageHeaderException.cs
- DataPagerField.cs
- NullRuntimeConfig.cs
- ImageIndexEditor.cs
- LineSegment.cs