Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- OrderPreservingMergeHelper.cs
- EnvelopedPkcs7.cs
- IdentityValidationException.cs
- HwndTarget.cs
- AbstractExpressions.cs
- DynamicDiscoSearcher.cs
- CryptoApi.cs
- CommandField.cs
- HttpPostProtocolImporter.cs
- CodeArrayCreateExpression.cs
- PreservationFileReader.cs
- ExternalException.cs
- SafeFileHandle.cs
- Constants.cs
- HostExecutionContextManager.cs
- RequestBringIntoViewEventArgs.cs
- VisualProxy.cs
- StylusPointPropertyInfo.cs
- InstanceKey.cs
- TransactionScope.cs
- Timer.cs
- SafeBitVector32.cs
- FileDialogPermission.cs
- StringValueSerializer.cs
- ComponentCollection.cs
- CorePropertiesFilter.cs
- PageRanges.cs
- ParallelTimeline.cs
- DataGridViewLinkColumn.cs
- RequestQueue.cs
- ConfigurationStrings.cs
- COM2ExtendedTypeConverter.cs
- CompiledQuery.cs
- MaskPropertyEditor.cs
- TextParagraphView.cs
- HttpListenerException.cs
- XmlTextReaderImpl.cs
- OleDbCommand.cs
- AttributeQuery.cs
- PrinterResolution.cs
- AuthenticationManager.cs
- XPathDocumentIterator.cs
- PartitionerQueryOperator.cs
- Int32Converter.cs
- DataKeyCollection.cs
- TreeNodeCollection.cs
- ObjectRef.cs
- DatatypeImplementation.cs
- IItemProperties.cs
- SessionPageStatePersister.cs
- EncoderReplacementFallback.cs
- sortedlist.cs
- FormViewPagerRow.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- RequestSecurityToken.cs
- GridEntryCollection.cs
- AdornerHitTestResult.cs
- BamlResourceContent.cs
- RuleRef.cs
- OleDbException.cs
- TriggerActionCollection.cs
- XPathNavigatorReader.cs
- TextReader.cs
- Expressions.cs
- KnownBoxes.cs
- ForceCopyBuildProvider.cs
- GlyphCache.cs
- DbTransaction.cs
- InputScopeAttribute.cs
- RegionIterator.cs
- DurationConverter.cs
- DocumentApplicationDocumentViewer.cs
- PersonalizationProvider.cs
- CookieProtection.cs
- Addressing.cs
- MouseButtonEventArgs.cs
- PersonalizationAdministration.cs
- HtmlTable.cs
- LineProperties.cs
- ImageListStreamer.cs
- ApplicationServiceHelper.cs
- _DynamicWinsockMethods.cs
- AutomationFocusChangedEventArgs.cs
- DataGridViewTextBoxEditingControl.cs
- Graphics.cs
- SplineQuaternionKeyFrame.cs
- SaveFileDialog.cs
- ListViewItemMouseHoverEvent.cs
- TypedColumnHandler.cs
- LogicalExpr.cs
- ACE.cs
- MLangCodePageEncoding.cs
- GlyphsSerializer.cs
- CompensatableTransactionScopeActivityDesigner.cs
- ResourceManager.cs
- _FixedSizeReader.cs
- TreeNode.cs
- Timer.cs
- InvalidFilterCriteriaException.cs
- SqlDesignerDataSourceView.cs