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
- TransformerConfigurationWizardBase.cs
- SmtpNegotiateAuthenticationModule.cs
- BlurBitmapEffect.cs
- CalendarDay.cs
- TrackBarRenderer.cs
- ScrollChangedEventArgs.cs
- TemplateKey.cs
- DataGridAutoFormat.cs
- Label.cs
- Trace.cs
- CachedTypeface.cs
- ReferencedCollectionType.cs
- DataTemplateSelector.cs
- WindowsToolbarItemAsMenuItem.cs
- MobileErrorInfo.cs
- MarshalByValueComponent.cs
- ProvidePropertyAttribute.cs
- XmlDesignerDataSourceView.cs
- IdentityModelStringsVersion1.cs
- WindowsTab.cs
- OpenFileDialog.cs
- COM2PictureConverter.cs
- ToolStripRenderer.cs
- DataGridSortCommandEventArgs.cs
- AttributeData.cs
- DbModificationCommandTree.cs
- HtmlInputControl.cs
- CompiledQuery.cs
- Pens.cs
- DataViewManagerListItemTypeDescriptor.cs
- Activator.cs
- CurrentTimeZone.cs
- AutomationProperties.cs
- XmlSchemaComplexContentExtension.cs
- PackagingUtilities.cs
- TableLayoutPanelCellPosition.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- AncestorChangedEventArgs.cs
- AnimationClockResource.cs
- TextTreeNode.cs
- ReflectionPermission.cs
- Exception.cs
- DesignObjectWrapper.cs
- AnimationClock.cs
- PassportAuthenticationModule.cs
- DataGridViewSelectedRowCollection.cs
- ConfigurationSectionGroupCollection.cs
- PersonalizationProviderHelper.cs
- VisualStateChangedEventArgs.cs
- SystemDropShadowChrome.cs
- FusionWrap.cs
- PrinterSettings.cs
- XmlNode.cs
- PerformanceCounter.cs
- X509SecurityTokenProvider.cs
- _Semaphore.cs
- XmlComplianceUtil.cs
- TreeNodeBindingCollection.cs
- DesignTimeParseData.cs
- Logging.cs
- TableSectionStyle.cs
- CodeGroup.cs
- Operators.cs
- ReadOnlyDictionary.cs
- ManipulationStartedEventArgs.cs
- TypeConverters.cs
- DataGridViewCellStyle.cs
- WaitHandle.cs
- ExpanderAutomationPeer.cs
- TemplateContent.cs
- PrinterResolution.cs
- DecimalAnimationUsingKeyFrames.cs
- TaskResultSetter.cs
- NotImplementedException.cs
- Tuple.cs
- SystemIPGlobalProperties.cs
- SqlBulkCopyColumnMappingCollection.cs
- BitmapEffectInputConnector.cs
- ConfigXmlAttribute.cs
- PathGradientBrush.cs
- ControlPaint.cs
- CreateUserWizard.cs
- SqlFacetAttribute.cs
- QilChoice.cs
- prefixendpointaddressmessagefiltertable.cs
- XmlTypeAttribute.cs
- GridViewPageEventArgs.cs
- UrlMappingCollection.cs
- ToolStripRenderer.cs
- DesignColumn.cs
- GridViewCommandEventArgs.cs
- IListConverters.cs
- SqlServer2KCompatibilityCheck.cs
- CollectionMarkupSerializer.cs
- NegationPusher.cs
- Vector3DAnimationBase.cs
- ParseNumbers.cs
- SiteMapHierarchicalDataSourceView.cs
- Model3DCollection.cs
- PlanCompilerUtil.cs