Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / Dom / XmlDocumentType.cs / 1 / XmlDocumentType.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System.Xml.Schema; using System.Diagnostics; // Contains information associated with the document type declaration. public class XmlDocumentType : XmlLinkedNode { string name; string publicId; string systemId; string internalSubset; bool namespaces; XmlNamedNodeMap entities; XmlNamedNodeMap notations; // parsed DTD SchemaInfo schemaInfo; protected internal XmlDocumentType( string name, string publicId, string systemId, string internalSubset, XmlDocument doc ) : base( doc ) { this.name = name; this.publicId = publicId; this.systemId = systemId; this.namespaces = true; this.internalSubset = internalSubset; Debug.Assert( doc != null ); if ( !doc.IsLoading ) { doc.IsLoading = true; XmlLoader loader = new XmlLoader(); loader.ParseDocumentType( this ); //will edit notation nodes, etc. doc.IsLoading = false; } } // Gets the name of the node. public override string Name { get { return name;} } // Gets the name of the current node without the namespace prefix. public override string LocalName { get { return name;} } // Gets the type of the current node. public override XmlNodeType NodeType { get { return XmlNodeType.DocumentType;} } // Creates a duplicate of this node. public override XmlNode CloneNode(bool deep) { Debug.Assert( OwnerDocument != null ); return OwnerDocument.CreateDocumentType( name, publicId, systemId, internalSubset ); } // // Microsoft extensions // // Gets a value indicating whether the node is read-only. public override bool IsReadOnly { get { return true; // Make entities and notations readonly } } // Gets the collection of XmlEntity nodes declared in the document type declaration. public XmlNamedNodeMap Entities { get { if (entities == null) entities = new XmlNamedNodeMap( this ); return entities; } } // Gets the collection of XmlNotation nodes present in the document type declaration. public XmlNamedNodeMap Notations { get { if (notations == null) notations = new XmlNamedNodeMap( this ); return notations; } } // // DOM Level 2 // // Gets the value of the public identifier on the DOCTYPE declaration. public string PublicId { get { return publicId;} } // Gets the value of // the system identifier on the DOCTYPE declaration. public string SystemId { get { return systemId;} } // Gets the entire value of the DTD internal subset // on the DOCTYPE declaration. public string InternalSubset { get { return internalSubset;} } internal bool ParseWithNamespaces { get { return namespaces; } set { namespaces = value; } } // Saves the node to the specified XmlWriter. public override void WriteTo(XmlWriter w) { w.WriteDocType( name, publicId, systemId, internalSubset ); } // Saves all the children of the node to the specified XmlWriter. public override void WriteContentTo(XmlWriter w) { // Intentionally do nothing } internal SchemaInfo DtdSchemaInfo { get { return schemaInfo; } set { schemaInfo = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HwndHost.cs
- X509SecurityTokenParameters.cs
- VisualStateChangedEventArgs.cs
- isolationinterop.cs
- WindowsGraphics.cs
- KeyValuePairs.cs
- TypedRowHandler.cs
- DispatcherFrame.cs
- ItemCollection.cs
- LinkUtilities.cs
- X500Name.cs
- BinHexEncoder.cs
- ProcessHost.cs
- DescendentsWalker.cs
- FtpCachePolicyElement.cs
- ButtonField.cs
- SqlCacheDependencyDatabaseCollection.cs
- AsyncSerializedWorker.cs
- Soap.cs
- WebBrowsableAttribute.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- Queue.cs
- MemoryMappedViewStream.cs
- SafeEventLogReadHandle.cs
- PlatformNotSupportedException.cs
- XmlDataProvider.cs
- OleDbDataAdapter.cs
- SecurityChannel.cs
- ContainsSearchOperator.cs
- ResourcesChangeInfo.cs
- AgileSafeNativeMemoryHandle.cs
- PrintDialog.cs
- EntityDataSourceReferenceGroup.cs
- X509RawDataKeyIdentifierClause.cs
- CommonServiceBehaviorElement.cs
- TypeSystemHelpers.cs
- SoapClientProtocol.cs
- TabletDeviceInfo.cs
- SqlNodeAnnotations.cs
- GroupBox.cs
- RelationshipWrapper.cs
- DateTimeOffset.cs
- EndpointAddress10.cs
- WebPartZone.cs
- Point3DIndependentAnimationStorage.cs
- PackageDigitalSignatureManager.cs
- Pair.cs
- _PooledStream.cs
- StretchValidation.cs
- Inflater.cs
- CompositeActivityValidator.cs
- _CacheStreams.cs
- TraceContextEventArgs.cs
- ReachSerializerAsync.cs
- MethodBuilder.cs
- SafeRegistryHandle.cs
- CustomTypeDescriptor.cs
- CodeCatchClauseCollection.cs
- SharedStatics.cs
- GridView.cs
- ArraySubsetEnumerator.cs
- ListViewDeleteEventArgs.cs
- ViewValidator.cs
- DataSourceXmlSerializationAttribute.cs
- AssertHelper.cs
- EncryptedType.cs
- ModuleBuilderData.cs
- WaitForChangedResult.cs
- RectKeyFrameCollection.cs
- XPathNodeHelper.cs
- EtwTrace.cs
- BitmapEffectInput.cs
- MailMessage.cs
- InternalSafeNativeMethods.cs
- EnumMember.cs
- SettingsContext.cs
- UnmanagedBitmapWrapper.cs
- PropertyBuilder.cs
- ArcSegment.cs
- OdbcEnvironment.cs
- _BaseOverlappedAsyncResult.cs
- ListItemConverter.cs
- MetadataItemEmitter.cs
- ListViewDeletedEventArgs.cs
- DBAsyncResult.cs
- GridEntry.cs
- ToolboxService.cs
- DragAssistanceManager.cs
- MergeLocalizationDirectives.cs
- ExpressionNode.cs
- SegmentInfo.cs
- Schedule.cs
- LineGeometry.cs
- SplashScreenNativeMethods.cs
- ObjectMaterializedEventArgs.cs
- CompoundFileStorageReference.cs
- SystemResourceHost.cs
- SHA256.cs
- StatusStrip.cs
- UnsafeNativeMethods.cs