Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- KnownBoxes.cs
- ResourceSet.cs
- StrongNameMembershipCondition.cs
- CqlErrorHelper.cs
- RowToParametersTransformer.cs
- RequestCachingSection.cs
- DataSourceCacheDurationConverter.cs
- AttributeXamlType.cs
- EntityViewGenerationConstants.cs
- Button.cs
- FastPropertyAccessor.cs
- EasingQuaternionKeyFrame.cs
- ADMembershipProvider.cs
- ServiceOperationUIEditor.cs
- TimeoutValidationAttribute.cs
- DoubleLink.cs
- HtmlTableRowCollection.cs
- Stack.cs
- AdjustableArrowCap.cs
- DtrList.cs
- OutputCacheSection.cs
- cookieexception.cs
- Vector3DAnimationBase.cs
- RectIndependentAnimationStorage.cs
- base64Transforms.cs
- DbgCompiler.cs
- MatrixTransform.cs
- ObjectList.cs
- IPAddress.cs
- TypedDataSourceCodeGenerator.cs
- CodeTypeReferenceExpression.cs
- DtdParser.cs
- SizeF.cs
- SchemaElementLookUpTableEnumerator.cs
- QuadraticBezierSegment.cs
- AuthenticationSection.cs
- JulianCalendar.cs
- EnumDataContract.cs
- BaseUriHelper.cs
- SafeWaitHandle.cs
- OutputCacheSettings.cs
- SimpleTypeResolver.cs
- SecurityNegotiationException.cs
- RawStylusSystemGestureInputReport.cs
- QilValidationVisitor.cs
- ResourceAssociationTypeEnd.cs
- DrawingBrush.cs
- ObjectViewEntityCollectionData.cs
- ValidationPropertyAttribute.cs
- EntityDataSourceWrapperCollection.cs
- SiteOfOriginPart.cs
- NumberSubstitution.cs
- SequentialUshortCollection.cs
- QueryableDataSourceEditData.cs
- EFDataModelProvider.cs
- ApplicationInterop.cs
- DataGridItem.cs
- UriSection.cs
- RuntimeHelpers.cs
- ReaderContextStackData.cs
- XmlSchemaImport.cs
- LogWriteRestartAreaAsyncResult.cs
- sqlstateclientmanager.cs
- XPathNavigatorReader.cs
- _SecureChannel.cs
- OutputCacheEntry.cs
- DesignSurfaceEvent.cs
- TimeoutException.cs
- ToolStripItemRenderEventArgs.cs
- __ConsoleStream.cs
- XmlObjectSerializer.cs
- XmlSchemaImporter.cs
- WmiEventSink.cs
- StringAnimationBase.cs
- CodeGroup.cs
- ObjectListCommandCollection.cs
- ExecutionEngineException.cs
- TemplateBamlTreeBuilder.cs
- SQLDouble.cs
- ExtensionFile.cs
- ImageBrush.cs
- MessageSecurityOverMsmq.cs
- SerTrace.cs
- TypeDescriptionProviderAttribute.cs
- DataSourceSelectArguments.cs
- XmlSubtreeReader.cs
- counter.cs
- TcpClientSocketManager.cs
- WinInet.cs
- SelectorItemAutomationPeer.cs
- WriteFileContext.cs
- OutputCacheEntry.cs
- Errors.cs
- TextPattern.cs
- EventLogPermission.cs
- ColumnBinding.cs
- SimpleBitVector32.cs
- DbMetaDataFactory.cs
- EnumType.cs
- TagPrefixAttribute.cs