http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Installation
Build

API Docs
Samples
Programming
Migration
FAQs

Releases
Feedback
Bug-Todo

Download
CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DOM_DocumentType Class Reference

Each Document has a doctype whose value is either null or a DocumentType object. More...

#include <DOM_DocumentType.hpp>

Inheritance diagram for DOM_DocumentType

Inheritance graph
[legend]
Collaboration diagram for DOM_DocumentType:

Collaboration graph
[legend]
List of all members.

Public Methods

Constructors and assignment operator
 DOM_DocumentType ()
 Default constructor for DOM_DocumentType. More...

 DOM_DocumentType (int nullPointer)
 Constructor for a null DOM_DocumentType. More...

 DOM_DocumentType (const DOM_DocumentType &other)
 Copy constructor. More...

DOM_DocumentType& operator= (const DOM_DocumentType &other)
 Assignment operator. More...

DOM_DocumentType& operator= (const DOM_NullPtr *val)
 Assignment operator. More...

Destructor.
 ~DOM_DocumentType ()
 Destructor for DOM_DocumentType. More...

Getter functions.
DOMString getName () const
 The name of DTD; i.e., the name immediately following the DOCTYPE keyword in an XML source document.

DOM_NamedNodeMap getEntities () const
 This function returns a NamedNodeMap containing the general entities, both external and internal, declared in the DTD. More...

DOM_NamedNodeMap getNotations () const
 This function returns a named node map containing an entry for each notation declared in a document's DTD. More...

Functions introduced in DOM Level 2.
DOMString getPublicId () const
 Get the public identifier of the external subset. More...

DOMString getSystemId () const
 Get the system identifier of the external subset. More...

DOMString getInternalSubset () const
 Get the internal subset as a string. More...


Protected Methods

 DOM_DocumentType (DocumentTypeImpl *)

Friends

class  DOM_Document
class  DOM_DOMImplementation

Detailed Description

Each Document has a doctype whose value is either null or a DocumentType object.

The DOM_DocumentType class provides access to the list of entities and notations that are defined for the document.

The DOM Level 1 doesn't support editing DocumentType nodes.


Constructor & Destructor Documentation

DOM_DocumentType::DOM_DocumentType ( )
 

Default constructor for DOM_DocumentType.

The resulting object does not refer to an actual DocumentType node; it will compare == to 0, and is similar to a null object reference variable in Java. It may subsequently be assigned to refer to the actual DocumentType node.

A new DocumentType node for a document that does not already have one can be created by DOM_Document::createDocumentType().

DOM_DocumentType::DOM_DocumentType ( int nullPointer )
 

Constructor for a null DOM_DocumentType.

This allows passing 0 directly as a null DOM_DocumentType to function calls that take DOM_DocumentType as parameters.

Parameters:
nullPointer   Must be 0.

DOM_DocumentType::DOM_DocumentType ( const DOM_DocumentType & other )
 

Copy constructor.

Creates a new DOM_Comment that refers to the same underlying node as the original.

Parameters:
other   The object to be copied.

DOM_DocumentType::~DOM_DocumentType ( )
 

Destructor for DOM_DocumentType.

The object being destroyed is the reference object, not the underlying DocumentType node itself.

DOM_DocumentType::DOM_DocumentType ( DocumentTypeImpl * ) [protected]
 


Member Function Documentation

DOM_NamedNodeMap DOM_DocumentType::getEntities ( ) const
 

This function returns a NamedNodeMap containing the general entities, both external and internal, declared in the DTD.

Parameter entities are not contained. Duplicates are discarded.

Note: this functionality is not implemented in the initial release of the parser, and the returned NamedNodeMap will be empty.

DOMString DOM_DocumentType::getInternalSubset ( ) const
 

Get the internal subset as a string.

"Experimental - subject to change"

Returns:
The internal subset as a string.

DOMString DOM_DocumentType::getName ( ) const
 

The name of DTD; i.e., the name immediately following the DOCTYPE keyword in an XML source document.

DOM_NamedNodeMap DOM_DocumentType::getNotations ( ) const
 

This function returns a named node map containing an entry for each notation declared in a document's DTD.

Duplicates are discarded.

Note: this functionality is not implemented in the initial release of the parser, and the returned NamedNodeMap will be empty.

DOMString DOM_DocumentType::getPublicId ( ) const
 

Get the public identifier of the external subset.

"Experimental - subject to change"

Returns:
The public identifier of the external subset.

DOMString DOM_DocumentType::getSystemId ( ) const
 

Get the system identifier of the external subset.

"Experimental - subject to change"

Returns:
The system identifier of the external subset.

DOM_DocumentType & DOM_DocumentType::operator= ( const DOM_NullPtr * val )
 

Assignment operator.

This overloaded variant is provided for the sole purpose of setting a DOM_Node reference variable to zero. Nulling out a reference variable in this way will decrement the reference count on the underlying Node object that the variable formerly referenced. This effect is normally obtained when reference variable goes out of scope, but zeroing them can be useful for global instances, or for local instances that will remain in scope for an extended time, when the storage belonging to the underlying node needs to be reclaimed.

Parameters:
val.   Only a value of 0, or null, is allowed.

Reimplemented from DOM_Node.

DOM_DocumentType & DOM_DocumentType::operator= ( const DOM_DocumentType & other )
 

Assignment operator.

Parameters:
other   The object to be copied.


Friends And Related Function Documentation

class DOM_DOMImplementation [friend]
 

class DOM_Document [friend]
 

Reimplemented from DOM_Node.


The documentation for this class was generated from the following file:


Copyright © 2000 The Apache Software Foundation. All Rights Reserved.