LsmDomNode

## LsmDomNode LsmDomNode — Base class for DOM nodes |

## Synopsis

                        LsmDomNode;
    const char *        lsm_dom_node_get_node_name          (LsmDomNode *self);
    const char *        lsm_dom_node_get_node_value         (LsmDomNode *self);
    void                lsm_dom_node_set_node_value         (LsmDomNode *self,
                                                             const char *new_value);
    LsmDomNodeType      lsm_dom_node_get_node_type          (LsmDomNode *self);
    LsmDomNode *        lsm_dom_node_get_parent_node        (LsmDomNode *self);
    LsmDomNodeList *    lsm_dom_node_get_child_nodes        (LsmDomNode *self);
    LsmDomNode *        lsm_dom_node_get_first_child        (LsmDomNode *self);
    LsmDomNode *        lsm_dom_node_get_last_child         (LsmDomNode *self);
    LsmDomNode *        lsm_dom_node_get_previous_sibling   (LsmDomNode *self);
    LsmDomNode *        lsm_dom_node_get_next_sibling       (LsmDomNode *self);
    LsmDomNamedNodeMap * lsm_dom_node_get_attributes        (LsmDomNode *self);
    LsmDomNode *        lsm_dom_node_insert_before          (LsmDomNode *self,
                                                             LsmDomNode *new_child,
                                                             LsmDomNode *ref_child);
    LsmDomNode *        lsm_dom_node_replace_child          (LsmDomNode *self,
                                                             LsmDomNode *new_child,
                                                             LsmDomNode *old_child);
    LsmDomNode *        lsm_dom_node_append_child           (LsmDomNode *self,
                                                             LsmDomNode *new_child);
    LsmDomNode *        lsm_dom_node_remove_child           (LsmDomNode *self,
                                                             LsmDomNode *old_child);
    gboolean            lsm_dom_node_has_child_nodes        (LsmDomNode *self);
    void                lsm_dom_node_changed                (LsmDomNode *self);
    LsmDomDocument *    lsm_dom_node_get_owner_document     (LsmDomNode *self);

## Object Hierarchy

      GObject
       +----LsmDomNode
             +----LsmDomCharacterData
             +----LsmDomDocument
             +----LsmDomElement

## Description

## Details

### LsmDomNode

    typedef struct _LsmDomNode LsmDomNode;

### lsm_dom_node_get_node_name ()

    const char *        lsm_dom_node_get_node_name          (LsmDomNode *self);

Gets the node name.

`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.

`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);

`self` : | a LsmDomNode
Returns : | node parent. [transfer none]

### lsm_dom_node_get_child_nodes ()

    LsmDomNodeList *    lsm_dom_node_get_child_nodes        (LsmDomNode *self);

`self` : | a LsmDomNode
Returns : | node child list. [transfer none]

### lsm_dom_node_get_first_child ()

    LsmDomNode *        lsm_dom_node_get_first_child        (LsmDomNode *self);

`self` : | a LsmDomNode
Returns : | node first child. [transfer none]

### lsm_dom_node_get_last_child ()

    LsmDomNode *        lsm_dom_node_get_last_child         (LsmDomNode *self);

`self` : | a LsmDomNode
Returns : | node last child. [transfer none]

### lsm_dom_node_get_previous_sibling ()

    LsmDomNode *        lsm_dom_node_get_previous_sibling   (LsmDomNode *self);

`self` : | a LsmDomNode
Returns : | node previous sibling. [transfer none]

### lsm_dom_node_get_next_sibling ()

    LsmDomNode *        lsm_dom_node_get_next_sibling       (LsmDomNode *self);

`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.

`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.

`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.

`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.

`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);

`self` : | a LsmDomNode
Returns : | node owner document. [transfer none]