## LsmDomNode LsmDomNode — Base class for DOM nodes |

## Functions

const char * | lsm_dom_node_get_node_name ()
const char * | lsm_dom_node_get_node_value ()
void | lsm_dom_node_set_node_value ()
LsmDomNodeType | lsm_dom_node_get_node_type ()
LsmDomNode * | lsm_dom_node_get_parent_node ()
LsmDomNodeList * | lsm_dom_node_get_child_nodes ()
LsmDomNode * | lsm_dom_node_get_first_child ()
LsmDomNode * | lsm_dom_node_get_last_child ()
LsmDomNode * | lsm_dom_node_get_previous_sibling ()
LsmDomNode * | lsm_dom_node_get_next_sibling ()
LsmDomNamedNodeMap * | lsm_dom_node_get_attributes ()
LsmDomNode * | lsm_dom_node_insert_before ()
LsmDomNode * | lsm_dom_node_replace_child ()
LsmDomNode * | lsm_dom_node_append_child ()
LsmDomNode * | lsm_dom_node_remove_child ()
gboolean | lsm_dom_node_has_child_nodes ()
void | lsm_dom_node_changed ()
LsmDomDocument * | lsm_dom_node_get_owner_document ()

## Types and Values

| LsmDomNode

## Object Hierarchy

        GEnum
        ╰── LsmDomNodeType
        GObject
        ╰── LsmDomNode
            ├── LsmDomCharacterData
            ├── LsmDomDocument
            ╰── LsmDomElement

## Description

## Functions

### lsm_dom_node_get_node_name ()

    const char *
    lsm_dom_node_get_node_name (LsmDomNode *self);

Gets the node name.

#### Parameters

self | a LsmDomNode |

#### Returns

the node name.

### lsm_dom_node_get_node_value ()

    const char *
    lsm_dom_node_get_node_value (LsmDomNode *self);

Gets the node value.

#### Parameters

self | a LsmDomNode |

#### Returns

the node value.

### lsm_dom_node_set_node_value ()

    void
    lsm_dom_node_set_node_value (LsmDomNode *self,
                                 const char *new_value);

### lsm_dom_node_get_node_type ()

    LsmDomNodeType
    lsm_dom_node_get_node_type (LsmDomNode *self);

### lsm_dom_node_get_parent_node ()

    LsmDomNode *
    lsm_dom_node_get_parent_node (LsmDomNode *self);

#### Parameters

self | a LsmDomNode |

#### Returns

node parent.

[transfer none]

### lsm_dom_node_get_child_nodes ()

    LsmDomNodeList *
    lsm_dom_node_get_child_nodes (LsmDomNode *self);

#### Parameters

self | a LsmDomNode |

#### Returns

node child list.

[transfer none]

### lsm_dom_node_get_first_child ()

    LsmDomNode *
    lsm_dom_node_get_first_child (LsmDomNode *self);

#### Parameters

self | a LsmDomNode |

#### Returns

node first child.

[transfer none]

### lsm_dom_node_get_last_child ()

    LsmDomNode *
    lsm_dom_node_get_last_child (LsmDomNode *self);

#### Parameters

self | a LsmDomNode |

#### Returns

node last child.

[transfer none]

### lsm_dom_node_get_previous_sibling ()

    LsmDomNode *
    lsm_dom_node_get_previous_sibling (LsmDomNode *self);

#### Parameters

self | a LsmDomNode |

#### Returns

node previous sibling.

[transfer none]

### lsm_dom_node_get_next_sibling ()

    LsmDomNode *
    lsm_dom_node_get_next_sibling (LsmDomNode *self);

#### Parameters

self | a LsmDomNode |

#### Returns

node next sibling.

[transfer none]

### lsm_dom_node_get_attributes ()

    LsmDomNamedNodeMap *
    lsm_dom_node_get_attributes (LsmDomNode *self);

### lsm_dom_node_insert_before ()

    LsmDomNode *
    lsm_dom_node_insert_before (LsmDomNode *self,
                                LsmDomNode *new_child,
                                LsmDomNode *ref_child);

Inserts the node `new_child` before the existing child node `ref_child` . If `ref_child` is null, insert `new_child` at the end of the list of children. If the `new_child` is already in the tree, it is first removed.

#### Parameters

self | a LsmDomNode |
new_child | node to insert. | [transfer full]
ref_child | reference node, i.e., the node before which the new node must be inserted. | [transfer none]

#### Returns

the inserted node.

[transfer none]

### lsm_dom_node_replace_child ()

    LsmDomNode *
    lsm_dom_node_replace_child (LsmDomNode *self,
                                LsmDomNode *new_child,
                                LsmDomNode *old_child);

Replaces the child node `old_child` with `new_child` in the list of children, and returns the `old_child` node. If the `new_child` is already in the tree, it is first removed.

#### Parameters

self | a LsmDomNode |
new_child | a replacement node. | [transfer full]
old_child | node to replace. | [transfer none]

#### Returns

the replaced node.

[transfer full]

### lsm_dom_node_append_child ()

    LsmDomNode *
    lsm_dom_node_append_child (LsmDomNode *self,
                               LsmDomNode *new_child);

Adds the node `new_child` to the end of the list of children of this node. If the `new_child` is already in the tree, it is first removed.

#### Parameters

self | a LsmDomNode |
new_child | node to append. | [transfer full]

#### Returns

the added node.

[transfer none]

### lsm_dom_node_remove_child ()

    LsmDomNode *
    lsm_dom_node_remove_child (LsmDomNode *self,
                               LsmDomNode *old_child);

Removes the child node indicated by `old_child` from the list of children, and returns it.

#### Parameters

self | a LsmDomNode |
old_child | node to remove. | [transfer none]

#### Returns

the removed node.

[transfer full]

### lsm_dom_node_has_child_nodes ()

    gboolean
    lsm_dom_node_has_child_nodes (LsmDomNode *self);

### lsm_dom_node_changed ()

    void
    lsm_dom_node_changed (LsmDomNode *self);

### lsm_dom_node_get_owner_document ()

    LsmDomDocument *
    lsm_dom_node_get_owner_document (LsmDomNode *self);

#### Parameters

self | a LsmDomNode |

#### Returns

node owner document.

[transfer none]

## Types and Values

### LsmDomNode

    typedef struct _LsmDomNode LsmDomNode;