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
- XmlEntity.cs
- TreeBuilderBamlTranslator.cs
- SqlGenerator.cs
- SectionInformation.cs
- Cursor.cs
- ConstraintCollection.cs
- DoubleCollection.cs
- XmlCharType.cs
- VariableQuery.cs
- TreeNodeCollectionEditorDialog.cs
- AppDomainShutdownMonitor.cs
- CategoryNameCollection.cs
- BaseTypeViewSchema.cs
- HwndMouseInputProvider.cs
- CachedFontFamily.cs
- DesignerVerb.cs
- SecurityRuntime.cs
- WebPartExportVerb.cs
- OdbcConnection.cs
- HandleExceptionArgs.cs
- XmlLinkedNode.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- EndpointPerformanceCounters.cs
- EncoderFallback.cs
- Viewport2DVisual3D.cs
- wmiprovider.cs
- ErrorLog.cs
- FontFaceLayoutInfo.cs
- COAUTHINFO.cs
- EncryptedKeyHashIdentifierClause.cs
- Dump.cs
- SecurityUtils.cs
- TableCell.cs
- SqlComparer.cs
- AssemblyAttributesGoHere.cs
- CircleHotSpot.cs
- EntityDesignerUtils.cs
- KeyEvent.cs
- KeyEvent.cs
- EventLogPermissionEntry.cs
- WindowsPrincipal.cs
- HideDisabledControlAdapter.cs
- DbParameterCollectionHelper.cs
- ScriptManagerProxy.cs
- SimpleHandlerBuildProvider.cs
- ProjectionAnalyzer.cs
- TypeInfo.cs
- AttachInfo.cs
- GC.cs
- TargetException.cs
- StylusPointProperties.cs
- FileLevelControlBuilderAttribute.cs
- SkewTransform.cs
- Baml2006KeyRecord.cs
- Font.cs
- BasicCellRelation.cs
- PointAnimationClockResource.cs
- BaseProcessor.cs
- Transform.cs
- SoapHeaderAttribute.cs
- Hashtable.cs
- MetadataItemCollectionFactory.cs
- DataList.cs
- AccessDataSourceWizardForm.cs
- PathFigureCollectionConverter.cs
- Funcletizer.cs
- LazyInitializer.cs
- TypeDescriptionProvider.cs
- NetworkInformationPermission.cs
- DrawingContextDrawingContextWalker.cs
- HierarchicalDataSourceControl.cs
- TypeReference.cs
- ValueType.cs
- webbrowsersite.cs
- ConnectionManagementSection.cs
- ServiceModelExtensionCollectionElement.cs
- AgileSafeNativeMemoryHandle.cs
- AliasExpr.cs
- OleDbReferenceCollection.cs
- WebServiceErrorEvent.cs
- LayoutTableCell.cs
- FormsAuthenticationUserCollection.cs
- WeakReadOnlyCollection.cs
- DiscreteKeyFrames.cs
- messageonlyhwndwrapper.cs
- DynamicQueryableWrapper.cs
- EditorZoneBase.cs
- SrgsItemList.cs
- RijndaelManaged.cs
- TextTreeUndoUnit.cs
- MailHeaderInfo.cs
- MethodExpression.cs
- DataRowCollection.cs
- ContextMenu.cs
- VisualBasicReference.cs
- ApplicationException.cs
- WebPartUserCapability.cs
- Msec.cs
- CheckPair.cs
- AttributeXamlType.cs