Main Page   File List   File Members  

mxml_node.c File Reference

#include <stdio.h>
#include <ctype.h>
#include <mxml.h>

Defines

#define MALFORMED_ERROR(elem, val)

Functions

MXML_NODE * mxml_node_new ()
MXML_STATUS mxml_node_setup (MXML_NODE *node)
void mxml_node_unlink (MXML_NODE *node)
void mxml_node_insert_before (MXML_NODE *tg, MXML_NODE *node)
void mxml_node_insert_after (MXML_NODE *tg, MXML_NODE *node)
void mxml_node_insert_below (MXML_NODE *tg, MXML_NODE *node)
void mxml_node_add_below (MXML_NODE *tg, MXML_NODE *node)
MXML_NODE * mxml_node_clone (MXML_NODE *tg)
MXML_NODE * mxml_node_clone_tree (MXML_NODE *tg)
void mxml_node_destroy (MXML_NODE *node)
char * mxml_node_value_of (MXML_NODE *pNode, char *attrib)
char * mxml_node_value_of_default (MXML_NODE *pNode, char *attrib, char *val_default)
void mxml_node_read_data (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc, int iStyle)
MXML_STATUS mxml_node_read_name (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc)
MXML_STATUS mxml_node_read_attributes (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc, int style)
void mxml_node_read_directive (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc)
void mxml_node_read_pi (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc)
void mxml_node_read_tag (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc, int style)
void mxml_node_read_comment (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc)
void mxml_node_read_closing (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc)
MXML_STATUS mxml_node_read (MXML_REFIL *ref, MXML_NODE *pNode, MXML_DOCUMENT *doc, int iStyle)
void mxml_node_write_attributes (MXML_OUTPUT *out, MXML_ATTRIBUTE *attr, int style)
void mxml_node_file_indent (MXML_OUTPUT *out, int depth, int style)
MXML_STATUS mxml_node_write (MXML_OUTPUT *out, MXML_NODE *pNode, int style)

Define Documentation

#define MALFORMED_ERROR (  elem,
val    ) 
 

Value:

elem->status = MXML_STATUS_MALFORMED;\
   elem->error = val;\
   iStatus = -1;


Function Documentation

void mxml_node_add_below (  MXML_NODE *    tg,
MXML_NODE *    node
) 
 

Adds a node to the bottom of the children list of tg.

MXML_NODE* mxml_node_clone (  MXML_NODE *    tg ) 
 

Clones a node, but it does not sets the parent, nor the siblings; this clone is "floating" out of the tree hierarcy.

MXML_NODE* mxml_node_clone_tree (  MXML_NODE *    tg ) 
 

Clones a node and all its subtree, but it does not sets the parent, nor the siblings; this clone is "floating" out of the tree hierarcy.

void mxml_node_destroy (  MXML_NODE *    node ) 
 

Destroy a node, including all its children and brothers in the next branch. To destroy a subtree, unlink the root node of the subtree and then destroy it. To destroy a single node, unlink it and then move its children elsewhere; then destroy the node.

void mxml_node_file_indent (  MXML_OUTPUT *    out,
int    depth,
int    style
)  [static]
 

void mxml_node_insert_after (  MXML_NODE *    tg,
MXML_NODE *    node
) 
 

void mxml_node_insert_before (  MXML_NODE *    tg,
MXML_NODE *    node
) 
 

void mxml_node_insert_below (  MXML_NODE *    tg,
MXML_NODE *    node
) 
 

Creates a new tree level, so that the given node is added between tg and its former children.

MXML_NODE* mxml_node_new (    ) 
 

MXML_STATUS mxml_node_read (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc,
int    iStyle
) 
 

MXML_STATUS mxml_node_read_attributes (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc,
int    style
)  [static]
 

void mxml_node_read_closing (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc
)  [static]
 

void mxml_node_read_comment (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc
)  [static]
 

void mxml_node_read_data (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc,
int    iStyle
)  [static]
 

Reads a data node

void mxml_node_read_directive (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc
)  [static]
 

MXML_STATUS mxml_node_read_name (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc
)  [static]
 

void mxml_node_read_pi (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc
)  [static]
 

void mxml_node_read_tag (  MXML_REFIL *    ref,
MXML_NODE *    pNode,
MXML_DOCUMENT *    doc,
int    style
)  [static]
 

MXML_STATUS mxml_node_setup (  MXML_NODE *    node ) 
 

void mxml_node_unlink (  MXML_NODE *    node ) 
 

The unlink function is used to detach a node from the UPPER and PARENT hyerarcy. The node is "removed" so that siblings node are "squished", and possible parents are informed of the changes, so that they are able to get a new child to start the tree structure under them. The childs of the unlinked nodes are NOT unlinked, thus remains attached to the node: is like removing a branch with all its leaves.

char* mxml_node_value_of (  MXML_NODE *    pNode,
char *    attrib
) 
 

Scans a node for given attribute

char* mxml_node_value_of_default (  MXML_NODE *    pNode,
char *    attrib,
char *    val_default
) 
 

Scans a node for given attribute, returning a default value if the attribute can't be found.

MXML_STATUS mxml_node_write (  MXML_OUTPUT *    out,
MXML_NODE *    pNode,
int    style
) 
 

void mxml_node_write_attributes (  MXML_OUTPUT *    out,
MXML_ATTRIBUTE *    attr,
int    style
) 
 


Generated on Tue Jul 8 23:44:29 2003 for MXML by doxygen1.2.18