Code:
/ DotNET / DotNET / 8.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
- OleDbParameterCollection.cs
- HebrewNumber.cs
- ConnectionsZoneAutoFormat.cs
- XmlAnyAttributeAttribute.cs
- ModelUtilities.cs
- ProcessModelSection.cs
- ClientViaElement.cs
- RichTextBoxConstants.cs
- MethodToken.cs
- PolyBezierSegment.cs
- CodeNamespaceImportCollection.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- CombinedGeometry.cs
- VirtualPathProvider.cs
- ColorAnimationBase.cs
- XdrBuilder.cs
- SQLInt32Storage.cs
- SqlParameterCollection.cs
- RIPEMD160Managed.cs
- OracleConnectionString.cs
- ExceptionHelpers.cs
- Ray3DHitTestResult.cs
- ColorConvertedBitmapExtension.cs
- HtmlButton.cs
- SizeAnimationClockResource.cs
- WebPartConnectionsCancelEventArgs.cs
- IIS7WorkerRequest.cs
- OperationContractAttribute.cs
- UserControl.cs
- HostingEnvironmentException.cs
- NetWebProxyFinder.cs
- RtfToken.cs
- UIElement.cs
- Hex.cs
- XamlStackWriter.cs
- FillBehavior.cs
- GenericsInstances.cs
- DataControlFieldHeaderCell.cs
- BinarySerializer.cs
- RemotingService.cs
- MobileRedirect.cs
- XmlSchemaGroup.cs
- MustUnderstandSoapException.cs
- FileDialog_Vista.cs
- Int16AnimationUsingKeyFrames.cs
- ApplicationActivator.cs
- GridView.cs
- UpDownBaseDesigner.cs
- Command.cs
- WorkflowServiceHost.cs
- CircleHotSpot.cs
- SqlConnectionHelper.cs
- MatcherBuilder.cs
- SelectionEditor.cs
- SafeRightsManagementPubHandle.cs
- XmlReaderSettings.cs
- ControlOperationInvoker.cs
- HierarchicalDataBoundControl.cs
- ClientConfigurationSystem.cs
- UseLicense.cs
- CustomTypeDescriptor.cs
- MasterPageParser.cs
- WebBrowser.cs
- FixedSOMImage.cs
- returneventsaver.cs
- GACIdentityPermission.cs
- WindowsImpersonationContext.cs
- RequestCacheEntry.cs
- ApplicationSecurityInfo.cs
- Repeater.cs
- PartBasedPackageProperties.cs
- MarkupCompilePass1.cs
- PrintController.cs
- NavigatorOutput.cs
- SoapReflector.cs
- CommandDevice.cs
- BinarySerializer.cs
- _ShellExpression.cs
- SpellerHighlightLayer.cs
- SecureEnvironment.cs
- ListViewGroupCollectionEditor.cs
- CopyNodeSetAction.cs
- AmbiguousMatchException.cs
- ParseHttpDate.cs
- CodeObject.cs
- TemplatedControlDesigner.cs
- HttpInputStream.cs
- TimeSpanStorage.cs
- DrawingAttributesDefaultValueFactory.cs
- CollectionBuilder.cs
- CopyNamespacesAction.cs
- ListItemCollection.cs
- AnnotationComponentChooser.cs
- InplaceBitmapMetadataWriter.cs
- PathFigure.cs
- _NetworkingPerfCounters.cs
- WpfKnownType.cs
- GradientBrush.cs
- PathData.cs
- XmlElementList.cs