Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::XML::Document Class Reference

#include <Document.h>

Inheritance diagram for Poco::XML::Document:

Poco::XML::AbstractContainerNode Poco::XML::DocumentEvent Poco::XML::AbstractNode Poco::XML::Node Poco::XML::EventTarget Poco::XML::DOMObject

List of all members.


Detailed Description

The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.

Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.

Definition at line 71 of file Document.h.


Public Types

enum  {
  ELEMENT_NODE = 1, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE,
  ENTITY_REFERENCE_NODE, ENTITY_NODE, PROCESSING_INSTRUCTION_NODE, COMMENT_NODE,
  DOCUMENT_NODE, DOCUMENT_TYPE_NODE, DOCUMENT_FRAGMENT_NODE, NOTATION_NODE
}
typedef Poco::AutoReleasePool
< DOMObject
AutoReleasePool

Public Member Functions

void addEventListener (const XMLString &type, EventListener *listener, bool useCapture)
NodeappendChild (Node *newChild)
NamedNodeMapattributes () const
virtual void autoRelease ()
AutoReleasePoolautoReleasePool ()
 Returns a pointer to the documents Name Pool.
NodeListchildNodes () const
NodecloneNode (bool deep) const
void collectGarbage ()
 Returns a pointer to the documents Auto Release Pool.
AttrcreateAttribute (const XMLString &name) const
 Creates a ProcessingInstruction node given the specified target and data strings.
AttrcreateAttributeNS (const XMLString &namespaceURI, const XMLString &qualifiedName) const
 Creates an element of the given qualified name and namespace URI.
CDATASectioncreateCDATASection (const XMLString &data) const
 Creates a comment node given the specified string.
CommentcreateComment (const XMLString &data) const
 Creates a text node given the specified string.
DocumentFragmentcreateDocumentFragment () const
ElementcreateElement (const XMLString &tagName) const
ElementcreateElementNS (const XMLString &namespaceURI, const XMLString &qualifiedName) const
EntitycreateEntity (const XMLString &name, const XMLString &publicId, const XMLString &systemId, const XMLString &notationName) const
EntityReferencecreateEntityReference (const XMLString &name) const
EventcreateEvent (const XMLString &eventType) const
NotationcreateNotation (const XMLString &name, const XMLString &publicId, const XMLString &systemId) const
ProcessingInstructioncreateProcessingInstruction (const XMLString &target, const XMLString &data) const
 Creates a CDATASection node whose value is the specified string.
TextcreateTextNode (const XMLString &data) const
 Creates an empty DocumentFragment object.
bool dispatchEvent (Event *evt)
const DocumentTypedoctype () const
 Returns true if events are not suspeded.
 Document (DocumentType *pDocumentType, NamePool *pNamePool=0)
 Document (NamePool *pNamePool=0)
ElementdocumentElement () const
void duplicate () const
bool events () const
 Returns true if events are suspeded.
bool eventsSuspended () const
 Resumes all events suspended with suspendEvent();.
NodefirstChild () const
ElementgetElementById (const XMLString &elementId, const XMLString &idAttribute) const
ElementgetElementById (const XMLString &elementId) const
ElementgetElementByIdNS (const XMLString &elementId, const XMLString &idAttributeURI, const XMLString &idAttributeLocalName) const
NodeListgetElementsByTagName (const XMLString &name) const
NodeListgetElementsByTagNameNS (const XMLString &namespaceURI, const XMLString &localName) const
 Creates an attribute of the given qualified name and namespace URI.
const XMLString & getNodeValue () const
 Returns the value of this node, depending on its type.
bool hasAttributes () const
 Returns the local name of the node.
bool hasChildNodes () const
const DOMImplementationimplementation () const
NodeimportNode (Node *importedNode, bool deep)
XMLString innerText () const
 Returns whether this node (if it is an element) has any attributes.
NodeinsertBefore (Node *newChild, Node *refChild)
bool isSupported (const XMLString &feature, const XMLString &version) const
NodelastChild () const
const XMLString & localName () const
 Returns the namespace prefix from the qualified name of the node.
NamePoolnamePool ()
const XMLString & namespaceURI () const
NodenextSibling () const
const XMLString & nodeName () const
unsigned short nodeType () const
const XMLString & nodeValue () const
 Returns the name of this node, depending on its type.
void normalize ()
DocumentownerDocument () const
NodeparentNode () const
 Returns a code representing the type of the underlying object.
XMLString prefix () const
NodepreviousSibling () const
void release () const
 Increases the object's reference count.
NoderemoveChild (Node *oldChild)
void removeEventListener (const XMLString &type, EventListener *listener, bool useCapture)
NodereplaceChild (Node *newChild, Node *oldChild)
void resumeEvents ()
 Suspends all events until resumeEvents() is called.
void setNodeValue (const XMLString &value)
 Returns the value of this node, depending on its type.
void suspendEvents ()
 Releases all objects in the Auto Release Pool.

Protected Member Functions

void bubbleEvent (Event *evt)
void captureEvent (Event *evt)
NodecopyNode (bool deep, Document *pOwnerDocument) const
void dispatchAttrModified (Attr *pAttr, MutationEvent::AttrChangeType changeType, const XMLString &prevValue, const XMLString &newValue)
void dispatchCharacterDataModified (const XMLString &prevValue, const XMLString &newValue)
void dispatchNodeInserted ()
void dispatchNodeInsertedIntoDocument ()
void dispatchNodeRemoved ()
void dispatchNodeRemovedFromDocument ()
void dispatchSubtreeModified ()
DocumentTypegetDoctype ()
void setDoctype (DocumentType *pDoctype)
void setOwnerDocument (Document *pOwnerDocument)
 ~Document ()

Static Protected Attributes

static const XMLString EMPTY_STRING

Private Attributes

AutoReleasePool _autoReleasePool
int _eventSuspendLevel
DocumentType_pDocumentType
NamePool_pNamePool

Static Private Attributes

static const XMLString NODE_NAME = toXMLString("#document")

Friends

class DOMBuilder

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

Generated by  Doxygen 1.6.0   Back to index