RAVE
|
Simple XML object frontend to expat. More...
Go to the source code of this file.
Typedefs | |
typedef struct _SimpleXmlNode_t | SimpleXmlNode_t |
Functions | |
SimpleXmlNode_t * | SimpleXmlNode_parseFile (const char *filename) |
The parser function for parsing the xml-file into a node tree. | |
void | SimpleXmlNode_setParent (SimpleXmlNode_t *self, SimpleXmlNode_t *parent) |
Sets the parent for this node. | |
SimpleXmlNode_t * | SimpleXmlNode_getParent (SimpleXmlNode_t *self) |
Returns the parent for this node. | |
int | SimpleXmlNode_setName (SimpleXmlNode_t *self, const char *name) |
Sets the tag name of this node. | |
const char * | SimpleXmlNode_getName (SimpleXmlNode_t *self) |
Returns the tag name of this node. | |
int | SimpleXmlNode_setText (SimpleXmlNode_t *self, const char *text, int len) |
Sets the text. | |
int | SimpleXmlNode_addText (SimpleXmlNode_t *self, const char *text, int len) |
Adds text. | |
const char * | SimpleXmlNode_getText (SimpleXmlNode_t *self) |
Returns the text. | |
int | SimpleXmlNode_addChild (SimpleXmlNode_t *self, SimpleXmlNode_t *child) |
Adds a child to this node. | |
void | SimpleXmlNode_remove (SimpleXmlNode_t *self, SimpleXmlNode_t *child) |
Removes the given child from the children list. | |
int | SimpleXmlNode_getNumberOfChildren (SimpleXmlNode_t *self) |
Returns the number of children. | |
SimpleXmlNode_t * | SimpleXmlNode_getChild (SimpleXmlNode_t *self, int index) |
Returns the child at specified index. | |
SimpleXmlNode_t * | SimpleXmlNode_getChildByName (SimpleXmlNode_t *self, const char *name) |
Returns the child with the given name. | |
int | SimpleXmlNode_addAttribute (SimpleXmlNode_t *self, const char *key, const char *value) |
Adds an attribute to a node. | |
const char * | SimpleXmlNode_getAttribute (SimpleXmlNode_t *self, const char *key) |
Returns the attribute value for the specified attribute. | |
int | SimpleXmlNode_write (SimpleXmlNode_t *self, FILE *fp) |
Writes the node to the file pointer. | |
SimpleXmlNode_t * | SimpleXmlNode_create (SimpleXmlNode_t *parent, const char *name) |
Creates a xml node. | |
Variables | |
RaveCoreObjectType | SimpleXmlNode_TYPE |
Type definition to use when creating a rave object. | |
int SimpleXmlNode_addAttribute | ( | SimpleXmlNode_t * | self, |
const char * | key, | ||
const char * | value ) |
Adds an attribute to a node.
[in] | self | - self |
[in] | key | - the name of the attribute |
[in] | value | - the value of the attribute |
int SimpleXmlNode_addChild | ( | SimpleXmlNode_t * | self, |
SimpleXmlNode_t * | child ) |
Adds a child to this node.
[in] | self | - self |
[in] | child | - the child |
int SimpleXmlNode_addText | ( | SimpleXmlNode_t * | self, |
const char * | text, | ||
int | len ) |
Adds text.
[in] | self | - self |
[in] | text | - the text |
[in] | len | - the length of the text |
SimpleXmlNode_t * SimpleXmlNode_create | ( | SimpleXmlNode_t * | parent, |
const char * | name ) |
Creates a xml node.
If node is given, the created node will be created as a child to that node otherwise it will be created as a root node.
[in] | parent | - the parent node (MAY BE NULL) |
[in] | name | - the name of the node (MAY BE NULL) |
const char * SimpleXmlNode_getAttribute | ( | SimpleXmlNode_t * | self, |
const char * | key ) |
Returns the attribute value for the specified attribute.
[in] | self | - self |
[in] | key | - the name of the attribute |
SimpleXmlNode_t * SimpleXmlNode_getChild | ( | SimpleXmlNode_t * | self, |
int | index ) |
Returns the child at specified index.
[in] | self | - self |
[in] | index | - the index |
SimpleXmlNode_t * SimpleXmlNode_getChildByName | ( | SimpleXmlNode_t * | self, |
const char * | name ) |
Returns the child with the given name.
[in] | self | - self |
[in] | name | - the name of the node |
const char * SimpleXmlNode_getName | ( | SimpleXmlNode_t * | self | ) |
Returns the tag name of this node.
[in] | self | - self |
int SimpleXmlNode_getNumberOfChildren | ( | SimpleXmlNode_t * | self | ) |
Returns the number of children.
[in] | self | - self |
SimpleXmlNode_t * SimpleXmlNode_getParent | ( | SimpleXmlNode_t * | self | ) |
Returns the parent for this node.
[in] | self | - self |
const char * SimpleXmlNode_getText | ( | SimpleXmlNode_t * | self | ) |
Returns the text.
[in] | self | - self |
SimpleXmlNode_t * SimpleXmlNode_parseFile | ( | const char * | filename | ) |
The parser function for parsing the xml-file into a node tree.
[in] | filename | - the file to parse |
void SimpleXmlNode_remove | ( | SimpleXmlNode_t * | self, |
SimpleXmlNode_t * | child ) |
Removes the given child from the children list.
[in] | self | - self |
[in] | child | - the node to remove |
int SimpleXmlNode_setName | ( | SimpleXmlNode_t * | self, |
const char * | name ) |
Sets the tag name of this node.
[in] | self | - self |
[in] | name | - the name of the node |
void SimpleXmlNode_setParent | ( | SimpleXmlNode_t * | self, |
SimpleXmlNode_t * | parent ) |
Sets the parent for this node.
NOTE! The parent is just a raw pointer assignment so be careful when using it.
[in] | self | - self |
[in] | parent | - the parent |
int SimpleXmlNode_setText | ( | SimpleXmlNode_t * | self, |
const char * | text, | ||
int | len ) |
Sets the text.
The added text will be stripped of leading and trailing whitespaces (space, tab, newline and carriage return).
[in] | self | - self |
[in] | text | - the text |
[in] | len | - the length of text |
int SimpleXmlNode_write | ( | SimpleXmlNode_t * | self, |
FILE * | fp ) |
Writes the node to the file pointer.
[in] | self | - self |
[in] | fp | - the file pointer to write to |
|
extern |
Type definition to use when creating a rave object.