Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / Dom / XmlDocumentType.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- brushes.cs
- TreeViewDataItemAutomationPeer.cs
- TraceContextEventArgs.cs
- ButtonBase.cs
- DirectoryRootQuery.cs
- DirtyTextRange.cs
- BooleanSwitch.cs
- DiscoveryReferences.cs
- DataColumnMapping.cs
- DocumentPage.cs
- SafeTimerHandle.cs
- SoapAttributeAttribute.cs
- FirstMatchCodeGroup.cs
- TransformGroup.cs
- LinkedResource.cs
- Misc.cs
- UDPClient.cs
- ServiceHostingEnvironmentSection.cs
- XmlText.cs
- TextTreeRootNode.cs
- Span.cs
- TypeBuilderInstantiation.cs
- FileLogRecordHeader.cs
- LockCookie.cs
- ParseHttpDate.cs
- ToolStripItemRenderEventArgs.cs
- PerformanceCounterPermissionEntry.cs
- webeventbuffer.cs
- MatrixAnimationUsingKeyFrames.cs
- XPathEmptyIterator.cs
- MenuAutomationPeer.cs
- ExpressionConverter.cs
- EnumType.cs
- DocumentApplicationState.cs
- TimeZoneNotFoundException.cs
- ChangePasswordAutoFormat.cs
- TextEditorThreadLocalStore.cs
- EmbeddedObject.cs
- CodeSnippetStatement.cs
- CodeSubDirectoriesCollection.cs
- ColumnMap.cs
- HostingEnvironmentSection.cs
- EventHandlerList.cs
- StringUtil.cs
- SiteMap.cs
- PictureBox.cs
- XamlParser.cs
- HierarchicalDataTemplate.cs
- XmlExtensionFunction.cs
- MultiPageTextView.cs
- RichTextBox.cs
- Configuration.cs
- SafeRightsManagementPubHandle.cs
- TextElementCollection.cs
- KeyManager.cs
- RefType.cs
- COAUTHINFO.cs
- WorkflowApplicationTerminatedException.cs
- ZipIOLocalFileHeader.cs
- ContainerFilterService.cs
- GuidConverter.cs
- BufferBuilder.cs
- DefaultPrintController.cs
- Screen.cs
- XmlSortKeyAccumulator.cs
- XmlUtil.cs
- TimeoutHelper.cs
- glyphs.cs
- PersistNameAttribute.cs
- X509ImageLogo.cs
- SetterBaseCollection.cs
- WebPartDisplayModeEventArgs.cs
- ToolboxComponentsCreatedEventArgs.cs
- CreateParams.cs
- SoapIncludeAttribute.cs
- HttpProcessUtility.cs
- UpdateManifestForBrowserApplication.cs
- CompilerErrorCollection.cs
- PageSetupDialog.cs
- ACE.cs
- Bind.cs
- CombinedGeometry.cs
- MailMessage.cs
- shaperfactoryquerycacheentry.cs
- Types.cs
- UserPreferenceChangingEventArgs.cs
- RoleExceptions.cs
- XmlChildEnumerator.cs
- WebPartDescriptionCollection.cs
- ConfigUtil.cs
- DataServiceClientException.cs
- NamespaceDecl.cs
- InteropAutomationProvider.cs
- ContainsRowNumberChecker.cs
- formatter.cs
- Separator.cs
- LocalizationComments.cs
- QueryOutputWriter.cs
- TextBreakpoint.cs
- AutomationElementIdentifiers.cs