ELinks 0.16.1.1
dom_node Struct Reference

DOM node. More...

#include <node.h>

Collaboration diagram for dom_node:

Data Fields

uint16_t type
 The type of the node.
unsigned int allocated:1
 Was the node string allocated?
struct dom_string string
 Type specific node string.
struct dom_nodeparent
 The parent node.
union dom_node_data data
 Type specific node data.

Detailed Description

DOM node.

The node data structure is an abstract container that can be used to represent the hierarchic structure of a document, such as relation between elements, attributes, etc.

Note
This structure is size critical so keep ordering to make it easier to pack and avoid unneeded members.

Field Documentation

◆ allocated

unsigned int dom_node::allocated

Was the node string allocated?

◆ data

union dom_node_data dom_node::data

Type specific node data.

◆ parent

struct dom_node* dom_node::parent

The parent node.

The parent node is NULL for the root node.

◆ string

struct dom_string dom_node::string

Type specific node string.

Can contain either stuff like element name or for attributes the attribute name.

◆ type

uint16_t dom_node::type

The type of the node.

Holds a dom_node_type enum value.


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