|
HOME
SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port
FAQ
Documentation
Licensing
Download
Development (Trac)
Projects using pjsip
Mailing List
Open Source Links
About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono <bennylp pjsip.org>
|
|
Home --> Documentations --> PJLIB-UTIL Reference
Mini/Tiny XML Parser/Helper
[File Formats]
|
Data Structures |
| struct | pj_xml_attr |
| struct | pj_xml_node_head |
| struct | pj_xml_node |
Typedefs |
| typedef struct pj_xml_attr | pj_xml_attr |
| typedef struct pj_xml_node | pj_xml_node |
Functions |
| pj_xml_node * | pj_xml_parse (pj_pool_t *pool, char *msg, pj_size_t len) |
| int | pj_xml_print (const pj_xml_node *node, char *buf, pj_size_t len, pj_bool_t prolog) |
| pj_xml_node * | pj_xml_clone (pj_pool_t *pool, const pj_xml_node *rhs) |
| pj_xml_node * | pj_xml_node_new (pj_pool_t *pool, const pj_str_t *name) |
| pj_xml_attr * | pj_xml_attr_new (pj_pool_t *pool, const pj_str_t *name, const pj_str_t *value) |
| void | pj_xml_add_node (pj_xml_node *parent, pj_xml_node *node) |
| void | pj_xml_add_attr (pj_xml_node *node, pj_xml_attr *attr) |
| pj_xml_node * | pj_xml_find_node (pj_xml_node *parent, const pj_str_t *name) |
| pj_xml_node * | pj_xml_find_next_node (pj_xml_node *parent, pj_xml_node *node, const pj_str_t *name) |
| pj_xml_attr * | pj_xml_find_attr (pj_xml_node *node, const pj_str_t *name, const pj_str_t *value) |
| pj_xml_node * | pj_xml_find (pj_xml_node *parent, const pj_str_t *name, const void *data, pj_bool_t(*match)(pj_xml_node *, const void *)) |
Typedef Documentation
Typedef for XML attribute.
Function Documentation
Add attribute to a node.
- Parameters:
-
| node | Node. |
| attr | Attribute to add to node. |
Add node to another node.
- Parameters:
-
| parent | Parent node. |
| node | Node to be added to parent. |
Create new XML attribute.
- Parameters:
-
| pool | Pool. |
| name | Attribute name. |
| value | Attribute value. |
- Returns:
- The new XML attribute.
Clone XML node and all subnodes.
- Parameters:
-
| pool | Pool to allocate memory for new nodes. |
| rhs | The node to clone. |
- Returns:
- Cloned XML node, or NULL on fail.
Find a direct child node with the specified name and match the function.
- Parameters:
-
| parent | Parent node. |
| name | Optional name. |
| data | Data to be passed to matching function. |
| match | Optional matching function. |
- Returns:
- The first matched node, or NULL.
Find first attribute within a node with the specified name and optional value.
- Parameters:
-
| node | XML Node. |
| name | Attribute name to find. |
| value | Optional value to match. |
- Returns:
- XML attribute found, or NULL.
Find first node with the specified name.
- Parameters:
-
| parent | Parent node. |
| node | node->next is the starting point. |
| name | Node name to find. |
- Returns:
- XML node found or NULL.
Find first node with the specified name.
- Parameters:
-
| parent | Parent node. |
| name | Node name to find. |
- Returns:
- XML node found or NULL.
Create an empty node.
- Parameters:
-
| pool | Pool. |
| name | Node name. |
- Returns:
- The new node.
Parse XML message into XML document with a single root node. The parser is capable of parsing XML processing instruction construct ("<?") and XML comments ("<!--"), however such constructs will be ignored and will not be included in the resulted XML node tree.
- Parameters:
-
| pool | Pool to allocate memory from. |
| msg | The XML message to parse. |
| len | The length of the message. |
- Returns:
- XML root node, or NULL if the XML document can not be parsed.
Print XML into XML message. Note that the function WILL NOT NULL terminate the output.
- Parameters:
-
| node | The XML node to print. |
| buf | Buffer to hold the output message. |
| len | The length of the buffer. |
| prolog | If set to nonzero, will print XML prolog ("<?xml..") |
- Returns:
- The size of the printed message, or -1 if there is not sufficient space in the buffer to print the message.
PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library
(C)2001-2008 Benny Prijono
|
|