File:  [Public] / DOM / Document.h
Revision 1.4: download - view: text, annotated - select for diffs
Mon Jun 15 05:26:38 1998 UTC (25 years, 11 months ago) by daniel
Branches: MAIN
CVS tags: HEAD
Nearly completed Document interfaces, general cleanup, Daniel.

/*
 * Document.h : interfaces of the Document interface as defined by
 *       Document Object Model (Core) Level 1
 *       http://www.w3.org/TR/WD-DOM/level-one-core.html
 * 
 * Daniel.Veillard@w3.org
 *
 * $Id: Document.h,v 1.4 1998/06/15 05:26:38 daniel Exp $
 */

#ifndef __DOM_DOCUMENT_H__
#define __DOM_DOCUMENT_H__

#include "DocumentContext.h"
#include "Element.h"
#include "Node.h"
#include "NodeIterator.h"
#include "TreeIterator.h"
#include "Text.h"
#include "Comment.h"
#include "PI.h"
#include "Attribute.h"
#include "AttributeList.h"

/*
 * Structure
 */
typedef struct domDocument {
    domNodePtr documentType;		/* The DTD if any ... */
    domElementPtr documentElement;	/* The root of the document tree */
    domDocumentContextPtr contextInfo;	/* The document context */
} domDocument, * domDocumentPtr;

/*
 * Functions
 */

extern domElementPtr createElement(domDocumentPtr doc, char *tagName,
                                   domAttributeListPtr attributes);
extern domTextPtr createTextNode(domDocumentPtr doc, char *data);
extern domCommentPtr createCommentNode(domDocumentPtr doc, char *data);
extern domPIPtr createPINode(domDocumentPtr doc, char *name, char *data);
extern domAttributePtr createAttribute(domDocumentPtr doc, char *name,
                                        char *value);
extern domAttributeListPtr createAttributeList(domDocumentPtr doc);
extern domTreeIteratorPtr createTreeIterator(domDocumentPtr doc);
extern domNodeIteratorPtr getElementsByTagName(domDocumentPtr doc,
                                               char *tagname);

/* Cleanup stuff not handled by DOM */
extern void destroyElement(domElementPtr old);
extern void destroyText(domTextPtr old);
extern void destroyComment(domCommentPtr old);
extern void destroyPI(domPIPtr old);
extern void destroyAttribute(domAttributePtr old);
extern void destroyAttributeList(domAttributeListPtr old);
extern void destroyTreeIterator(domTreeIteratorPtr old);

#endif /* __DOM_DOCUMENT_H__ */



Webmaster