Asterisk XML abstraction layer.
More...
Go to the source code of this file.
Detailed Description
Asterisk XML abstraction layer.
Definition in file xml.h.
Function Documentation
void ast_xml_close |
( |
struct ast_xml_doc * |
doc | ) |
|
Close an already open document and free the used structure.
- Return values:
-
doc | The document reference. |
struct ast_xml_node* ast_xml_find_element |
( |
struct ast_xml_node * |
root_node, |
|
|
const char * |
name, |
|
|
const char * |
attrname, |
|
|
const char * |
attrvalue |
|
) |
| [read] |
Find a node element by name.
- Parameters:
-
node | This is the node starting point. |
name | Node name to find. |
attrname | attribute name to match (if NULL it won't be matched). |
attrvalue | attribute value to match (if NULL it won't be matched). |
- Return values:
-
NULL | if not found |
The | node on success. |
int ast_xml_finish |
( |
void |
| ) |
|
Cleanup library allocated global data.
- Return values:
-
void ast_xml_free_attr |
( |
const char * |
attribute | ) |
|
void ast_xml_free_node |
( |
struct ast_xml_node * |
node | ) |
|
void ast_xml_free_text |
( |
const char * |
text | ) |
|
const char* ast_xml_get_attribute |
( |
struct ast_xml_node * |
node, |
|
|
const char * |
attrname |
|
) |
| |
Get a node attribute by name.
- Parameters:
-
node | Node where to search the attribute. |
attrname | Attribute name. |
- Return values:
-
NULL | on error |
The | attribute value on success. |
struct ast_xml_node* ast_xml_get_root |
( |
struct ast_xml_doc * |
doc | ) |
[read] |
Get the document root node.
- Parameters:
-
- Return values:
-
NULL | on error |
The | root node on success. |
const char* ast_xml_get_text |
( |
struct ast_xml_node * |
node | ) |
|
Get an element content string.
- Parameters:
-
node | Node from where to get the string. |
- Return values:
-
NULL | on error. |
The | text content of node. |
int ast_xml_init |
( |
void |
| ) |
|
Initialize the XML library implementation. This function is used to setup everything needed to start working with the xml implementation.
- Return values:
-
struct ast_xml_node* ast_xml_node_get_children |
( |
struct ast_xml_node * |
node | ) |
[read] |
const char* ast_xml_node_get_name |
( |
struct ast_xml_node * |
node | ) |
|
struct ast_xml_node* ast_xml_node_get_next |
( |
struct ast_xml_node * |
node | ) |
[read] |
Get the next node in the same level.
struct ast_xml_node* ast_xml_node_get_parent |
( |
struct ast_xml_node * |
node | ) |
[read] |
Get the parent of a specified node.
struct ast_xml_node* ast_xml_node_get_prev |
( |
struct ast_xml_node * |
node | ) |
[read] |
Get the previous node in the same leve.
struct ast_xml_doc* ast_xml_open |
( |
char * |
filename | ) |
[read] |
Open an XML document.
- Parameters:
-
- Return values:
-
NULL | on error. |
The | ast_xml_doc reference to the open document. |