dom.h (1561B)
1 /* 2 * I will be exstensively using DOM Standard style for names and such 3 * in this file, despite my better judgement. 4 */ 5 6 /* node types */ 7 enum { 8 ELEMENT_NODE = 1, 9 ATTRIBUTE_NODE = 2, 10 TEXT_NODE = 3, 11 CDATA_SECTION_NODE = 4, 12 ENTITY_REFERENCE_NODE = 5, /* legacy */ 13 ENTITY_NODE = 6, /* legacy */ 14 PROCESSING_INSTRUCTION_NODE = 7, 15 COMMENT_NODE = 8, 16 DOCUMENT_NODE = 9, 17 DOCUMENT_TYPE_NODE = 10, 18 DOCUMENT_FRAGMENT_NODE = 11, 19 NOTATION_NODE = 12, /* legacy /* 20 }; 21 22 typedef struct Node Node; 23 24 struct Node { 25 u8int nodeType; 26 char *nodeName; 27 char *baseURI; 28 int isConnected; 29 Node *ownerDocument; 30 Node *parentNode; 31 Node *parentElement; 32 Node **childNodes; 33 Node *firstChild; 34 Node *lastChild; 35 Node *previousSibling; 36 Node *nextSibling; 37 char *nodeValue; 38 char *textContent; 39 /* Document specific */ 40 char *URL; 41 char *documentURI; 42 char *compatMode; 43 char *characterSet; 44 char *charset; /* legacy */ 45 char *inputEncoding; /* legacy */ 46 char *contentType; 47 Node *doctype; 48 Node *documentElement; 49 /* DocumentType specific */ 50 char *name; 51 char *publicId; 52 char *systemId; 53 /* Element specific */ 54 char *namespaceURI; 55 char *prefix; 56 char *localName; 57 char *tagName; 58 char *id; 59 char *className; 60 TokenList classList; /* ??? */ 61 char *slot; 62 NamedNodeMap attributes; /* ??? */ 63 /* Text specific */ 64 char *wholeText; 65 /* ProcessingInstruction specific */ 66 char *target; 67 /* CharacterDataSpecific */ 68 char *data; 69 ulong length; 70 };