DocType Class Reference

#include <Pt/Xml/DocType.h>

A DocType node represents the begin of a DTD. More...

Inherits Node, and NonCopyable.

Public Member Functions

 DocType (DocTypeDefinition &dtd)
 Construct an empty DocType node.
 
 ~DocType ()
 Destructor.
 
void clear ()
 Clears all content.
 
bool isExternal () const
 Returns true if the external DTD subset begins.
 
bool isInternal () const
 Returns true if the internal DTD subset begins.
 
const Pt::StringpublicId () const
 Returns the public ID of the external subset.
 
const QNamerootName () const
 Returns the documents root element name.
 
void setInternal (bool hasInternal)
 Indicates the begin of internal or external DTD subsets.
 
void setPublicId (const Pt::String &pubId)
 Sets the public ID of the external subset.
 
void setSystemId (const Pt::String &sysId)
 Sets the system ID of the external subset.
 
const Pt::StringsystemId () const
 Returns the system ID of the external subset.
 
Type type () const
 Returns the type of the node.
 

Related Functions

DocTypetoDocType (Node *node)
 Casts a generic node to a DocType node.
 
const DocTypetoDocType (const Node *node)
 Casts a generic node to a DocType node.
 
DocTypetoDocType (Node &node)
 Casts a generic node to a DocType node.
 
const DocTypetoDocType (const Node &node)
 Casts a generic node to a DocType node.
 

Detailed Description

DocType nodes are only reported when the XmlReader is configured to do so. DocType nodes might appear twice, before the internal DTD subset is parsed and before the external DTD subset is parsed. An EndDocType node indicates that a DTD subset is complete.