Functions | |
| air_xml_node_t * | air_xml_node_alloc_by_name (ualloc_t *ua, char *name) |
| air_err_t | air_xml_node_destroy (air_xml_node_t *n) |
| void | print_tree_inner (air_xml_node_t *node, int parent_type, int cnt, int flags) |
| void | air_xml_tree_print (air_xml_node_t *node, int flags) |
| air_err_t | air_xml_node_attr_name2index (air_xml_node_t *node, air_xml_node_attr_name_t a_name, air_xml_node_attr_id_t *index) |
| int | air_xml_have_snml () |
| Determine if this build of libair supports the SNML DTD. More... | |
| int | air_xml_have_idmef () |
| Determine if this build of libair supports the IDMEF DTD. More... | |
| int | air_xml_have_iodef () |
| Determine if this build of libair supports the IODEF DTD. More... | |
| int | air_xml_have_config () |
| Determine if this build of libair supports the aircert-config DTD. More... | |
| air_err_t | air_xml_tree_module_init (ualloc_t *ua) |
| Initializes the air_xml module. More... | |
| air_err_t | air_xml_tree_get_last_error (air_xml_tree_t *t) |
| Returns the last error that occurred on the given tree. More... | |
| air_err_t | air_xml_tree_destroy (air_xml_tree_t *t) |
| Deallocates a tree. More... | |
| air_err_t | air_xml_tree_get_root (air_xml_tree_t *t, air_xml_node_t **root_node) |
| Returns the root node of the tree. More... | |
| air_err_t | air_xml_tree_count_nodes (air_xml_tree_t *t, unsigned int *cnt) |
| Returns the number of nodes in the tree. More... | |
| char * | air_xml_tree_type2str (air_xml_schema_type_t name_en) |
| returns the string equivalent of a tree type. More... | |
| air_xml_schema_type_t | air_xml_tree_str2type (char *name_str) |
| returns the enumerated ID equivalent of a tree type specified as a string name. More... | |
| air_err_t | air_xml_tree_dup (air_xml_tree_t *src, air_xml_tree_t **dst) |
| makes an identical copy of a tree. More... | |
| air_err_t | air_xml_node_dup (ualloc_t *ua, air_xml_node_t *src_node, air_xml_node_t **dst_node, int mode) |
| air_err_t | air_xml_node_replicate (air_xml_node_t *source_node, air_xml_node_t **target_node, int method) |
| air_err_t | air_xml_node_create (air_xml_node_t *source_node, air_xml_node_t **new_node) |
| Creates a new node (another instance of an element) and links it as the sibling of the source node. More... | |
| air_err_t | air_xml_node_erase (air_xml_node_t **node) |
| Removes a node from the tree. More... | |
| air_err_t | air_xml_node_isset (air_xml_node_t *n) |
| Checks if the node is set. More... | |
| air_err_t | air_xml_node_attr_isset_by_name (air_xml_node_t *n, air_xml_node_attr_name_t attr_name) |
| Returns whether the given attribute (specified by name) is set. More... | |
| air_err_t | air_xml_node_set (air_xml_node_t *node) |
| explicitly mark a node as set. More... | |
| air_err_t | air_xml_node_unset (air_xml_node_t *node) |
| explicitly mark a node as unset. More... | |
| air_err_t | air_xml_tree_walk_by_path (air_xml_node_t *root_node, char *path, air_xml_node_t **node) |
| Finds a given node in the tree specified by a path. More... | |
| air_err_t | air_xml_tree_walk_by_path2 (air_xml_node_t *root_node, char *path, air_xml_node_t **node) |
| Identical in functionality as air_xml_tree_walk_by_path(), but this routine will return the node even if it is not set. More... | |
| air_err_t | air_xml_tree_walk_by_path_inner (air_xml_node_t *root_node, char *path, air_xml_node_t **node, air_flags_t flags) |
| air_err_t | air_xml_tree_isset (air_xml_tree_t *tree, char *path) |
| Returns whether the entity (be it a node or attribute) specified by the path is set. More... | |
| air_xml_node_attr_name_t | air_xml_path_get_lattr (air_ualloc_t *ua, char *path) |
| air_asciz_t | air_xml_path_get_parent (air_ualloc_t *ua, char *path) |
| air_asciz_t | air_xml_path_get_lnode (air_ualloc_t *ua, char *path) |
| int | air_xml_path_get_lnode_count (air_ualloc_t *ua, char *path) |
| air_err_t | air_xml_tree_get_inner (air_xml_tree_t *tree, char *path, air_asciz_t *node_data, air_size_t *data_size, air_flags_t mode) |
| air_err_t | air_xml_tree_get (air_xml_tree_t *tree, char *path, air_asciz_t *node_data, air_size_t *data_size) |
| Returns the node or attribute value specified by the path. More... | |
| air_err_t | air_xml_tree_get_value (air_xml_tree_t *tree, char *path, air_asciz_t *node_data, air_size_t *data_size) |
| Returns the node value specified by the path. More... | |
| air_err_t | air_xml_tree_attr_get_by_name (air_xml_tree_t *tree, char *path, air_asciz_t *attr_value, air_size_t *attr_size) |
| Returns the attribute value specified by the path. More... | |
| air_err_t | air_xml_tree_set_inner (air_xml_tree_t *tree, char *path, air_asciz_t node_data, air_size_t *data_size, air_flags_t mode) |
| air_err_t | air_xml_tree_set (air_xml_tree_t *tree, char *path, air_asciz_t data, air_size_t *data_size) |
| Sets the value of a node or attribute specified by the path. More... | |
| air_err_t | air_xml_tree_set2 (air_xml_tree_t *tree, char *path, air_asciz_t data, air_size_t *data_size) |
| air_err_t | air_xml_tree_set_value (air_xml_tree_t *tree, char *path, air_asciz_t data, air_size_t *data_size) |
| Sets the value of a node specified by the path. More... | |
| air_err_t | air_xml_tree_attr_set_by_name (air_xml_tree_t *tree, char *path, air_asciz_t data, air_size_t *data_size) |
| Sets the value of an attribute specified by the path. More... | |
| air_err_t | air_xml_node_expand_recursive (air_xml_node_t **n) |
| air_err_t | air_xml_node_get_child (air_xml_node_t *n, air_xml_node_type_t node_type, int nth, air_xml_node_t **rez, air_flags_t flags) |
| Gets a given child node of the current node. More... | |
| air_err_t | air_xml_node_get_parent (air_xml_node_t *n, air_xml_node_t **parent_node) |
| Gets the parent node of the current node. More... | |
| air_err_t | air_xml_node_get_index (air_xml_node_t *n, air_size_t *out_count) |
| air_err_t | air_xml_node_get_sibling_count (air_xml_node_t *n, air_size_t *out_count) |
| air_err_t | air_xml_node_get_sibling (air_xml_node_t *n, air_size_t idx) |
| air_err_t | air_xml_node_get_first_sibling (air_xml_node_t *n, air_xml_node_t **out_sib) |
| get the first sibling of a node. More... | |
| air_err_t | air_xml_node_get_next_sibling (air_xml_node_t *n, air_xml_node_t **out_sib) |
| get a sibling. More... | |
| air_err_t | air_xml_node_get_tree (air_xml_node_t *n, air_xml_tree_t **tree) |
| Gets the tree of the current node. More... | |
| air_err_t | air_xml_node_get_value (air_xml_node_t *source_node, air_asciz_t *node_data, air_size_t *data_size) |
| Extracts the PCDATA of a particular tree node (i.e., xml element). More... | |
| air_err_t | air_xml_node_attr_get_by_name (air_xml_node_t *source_node, air_xml_node_attr_name_t attr_name, air_asciz_t *attr_value, air_size_t *attr_size) |
| Extracts an attribute value specified by name from a node (i.e., xml element). More... | |
| air_err_t | air_xml_node_attr_get_by_index (air_xml_node_t *source_node, air_xml_node_attr_id_t attr_id, air_asciz_t *attr_value, air_size_t *attr_size) |
| Extracts an attribute value specified by its order in the attribute list of a node (i.e., xml element). More... | |
| air_err_t | air_xml_node_set_value (air_xml_node_t *target_node, air_asciz_t data_value, air_size_t *data_size) |
| Sets the PCDATA of a particular tree node (i.e., xml element). More... | |
| air_err_t | air_xml_node_append_value (air_xml_node_t *target_node, air_asciz_t data_value, air_size_t *data_size) |
| Appends new PCDATA to a particular tree node (i.e., xml element). More... | |
| air_err_t | air_xml_node_attr_set_by_name (air_xml_node_t *target_node, air_xml_node_attr_name_t attr_name, air_asciz_t attr_value, air_size_t *data_size) |
| Sets an attribute value specified by name on a node (i.e., xml element). More... | |
| air_err_t | air_xml_node_attr_set_by_index (air_xml_node_t *target_node, air_xml_node_attr_id_t attr_id, air_asciz_t attr_value, air_size_t *data_size) |
| Sets an attribute value specified by index on a node (i.e., xml element). More... | |
| air_err_t | air_xml_node_get_type (air_xml_node_t *n, air_xml_node_type_t *out_type) |
| returns the type of a given node. More... | |
| char * | air_xml_node_type2str (air_xml_node_type_en name_en) |
| returns the string equivalent of a node type (element name). More... | |
| air_xml_node_type_en | air_xml_node_str2type (char *name_str) |
| returns the enumerated ID equivalent of a node type (element name) specified as a string name. More... | |
| air_asciz_t | air_xml_node_path (air_xml_node_t *n, air_flags_t flags) |
| path to given node from the root of the tree. More... | |
| air_err_t | air_xml_iter_create (air_xml_node_t *node, air_xml_iter_t **iter) |
| air_err_t | air_xml_iter_free (air_xml_iter_t *iter) |
| air_err_t | air_xml_iter_reset (air_xml_iter_t *iter) |
| void | air_xml_iter_set_type (air_xml_iter_t *iter, air_xml_node_type_en type) |
| void | air_xml_iter_clear_type (air_xml_iter_t *iter) |
| air_err_t | air_xml_iter_next (air_xml_iter_t *iter, air_xml_node_t **child) |
| air_err_t | ih_node_attr_iter_create (air_xml_node_t *node, ih_node_attr_iter_t **iter) |
| Creates a new node attribute iterator. More... | |
| air_err_t | ih_node_attr_iter_next (ih_node_attr_iter_t **iter, air_xml_node_attr_name_t *attr_name, air_xml_node_data_t *attr_value, air_size_t *data_size) |
| Gets the next attribute in the iterated through node. More... | |
| air_err_t | ih_node_attr_iter_free (ih_node_attr_iter_t **iter) |
| Deallocates an node attribute iterator. More... | |
| air_err_t | ih_tree_iter_create (air_xml_node_t *root_node, ih_tree_iter_t **iter) |
| Creates a new tree iterator. More... | |
| air_err_t | ih_tree_iter_next (ih_tree_iter_t **iter, air_xml_node_t **node) |
| Gets the next node in the tree. More... | |
| air_err_t | ih_tree_iter_free (ih_tree_iter_t **iter) |
| Deallocates a tree iterator. More... | |
Variables | |
| char * | air_xml_tree_node_name [] |
| char * | air_xml_tree_schema_type_name [] |
The internal representation of an XML document is a tree structure (air_xml_tree_t) composed of nodes corresponding to XML elements (air_xml_node_t).
|
|
Determine if this build of libair supports the SNML DTD.
|
|
|
Determine if this build of libair supports the IDMEF DTD.
|
|
|
Determine if this build of libair supports the IODEF DTD.
|
|
|
Determine if this build of libair supports the aircert-config DTD.
|
|
|
Initializes the air_xml module.
Provides the air_xml module an air ualloc context for memory allocation. Presently a no-op, because ualloc contexts are bound to each air XML tree at creation time.
|
|
|
Returns the last error that occurred on the given tree.
|
|
|
Deallocates a tree.
|
|
||||||||||||
|
Returns the root node of the tree.
|
|
||||||||||||
|
Returns the number of nodes in the tree.
|
|
|
returns the string equivalent of a tree type.
|
|
|
returns the enumerated ID equivalent of a tree type specified as a string name.
|
|
||||||||||||
|
makes an identical copy of a tree.
Note: a new copy of the air_ualloc_t of the source is not made. The new copy and the original tree will both point to the identical ualloc_t structure.
|
|
||||||||||||||||||||
|
air_xml_node_dup() Internal function that duplicates a given node (and all of its attributes and children). Depending on the value of mode; the actual contents of attributes and the node will be copied,
|
|
||||||||||||
|
Creates a new node (another instance of an element) and links it as the sibling of the source node.
|
|
|
Removes a node from the tree.
|
|
|
Checks if the node is set.
|
|
||||||||||||
|
Returns whether the given attribute (specified by name) is set.
|
|
|
explicitly mark a node as set.
|
|
|
explicitly mark a node as unset.
|
|
||||||||||||||||
|
Finds a given node in the tree specified by a path.
/<node_name>/<node_name>[(<sequence>) | :<attribute>[=<value>]][<attribute>] An air XML path is similar to an XML XPath. It consists of a string composed of node names seperated by a deliminator ('/'). Consider the following document:
<foo>
<a>
<d> </d>
<b>
<c> </c>
</b>
</a>
</foo>
A path of "/foo/a/b/c" will traverse
Since it is possible for multiple nodes to appear a sequence primitive is supported ( '(number)' ). This sequence primitive counts from one. Consider the following document:
<foo>
<a z="yyy">
<d> </d>
<b>
<c> slot 1 </c>
</b>
<b>
<c> slot 2 </c>
</b>
</a>
</foo>
A
The special sequence primitive '(n)' is supported, and resolves to the last node having the given path; the path "a/b(n)/c" is equivalent to the example above.
This notation also supports specifying an attribute using the '@' symbol. For example, the path "/foo/a@z" specifies the 'z' attribute of the 'a' element.
Primitive attribute and value matching is also possible. For example,
|
|
||||||||||||||||
|
Identical in functionality as air_xml_tree_walk_by_path(), but this routine will return the node even if it is not set.
|
|
||||||||||||
|
Returns whether the entity (be it a node or attribute) specified by the path is set.
|
|
||||||||||||||||||||
|
Returns the node or attribute value specified by the path.
It is up to the caller to understand based on the specified path whether a node or attribute value has been specified.
|
|
||||||||||||||||||||
|
Returns the node value specified by the path.
|
|
||||||||||||||||||||
|
Returns the attribute value specified by the path.
|
|
||||||||||||||||||||
|
Sets the value of a node or attribute specified by the path.
It is up to the caller to understand based on the specified path whether a node or attribute value will be set.
|
|
||||||||||||||||||||
|
Sets the value of a node specified by the path.
|
|
||||||||||||||||||||
|
Sets the value of an attribute specified by the path.
|
|
||||||||||||||||||||||||
|
Gets a given child node of the current node.
|
|
||||||||||||
|
Gets the parent node of the current node.
|
|
||||||||||||
|
get the first sibling of a node.
|
|
||||||||||||
|
get a sibling.
|
|
||||||||||||
|
Gets the tree of the current node.
|
|
||||||||||||||||
|
Extracts the PCDATA of a particular tree node (i.e., xml element).
|
|
||||||||||||||||||||
|
Extracts an attribute value specified by name from a node (i.e., xml element).
|
|
||||||||||||||||||||
|
Extracts an attribute value specified by its order in the attribute list of a node (i.e., xml element).
|
|
||||||||||||||||
|
Sets the PCDATA of a particular tree node (i.e., xml element).
|
|
||||||||||||||||
|
Appends new PCDATA to a particular tree node (i.e., xml element).
|
|
||||||||||||||||||||
|
Sets an attribute value specified by name on a node (i.e., xml element).
|
|
||||||||||||||||||||
|
Sets an attribute value specified by index on a node (i.e., xml element).
|
|
||||||||||||
|
returns the type of a given node.
|
|
|
returns the string equivalent of a node type (element name).
|
|
|
returns the enumerated ID equivalent of a node type (element name) specified as a string name.
|
|
||||||||||||
|
path to given node from the root of the tree.
|
|
||||||||||||
|
Creates a new node attribute iterator.
|
|
||||||||||||||||||||
|
Gets the next attribute in the iterated through node.
|
|
|
Deallocates an node attribute iterator.
|
|
||||||||||||
|
Creates a new tree iterator.
|
|
||||||||||||
|
Gets the next node in the tree.
|
|
|
Deallocates a tree iterator.
|
|
|
Initial value: { "snml",
"iodef",
"idmef",
"config", } |