Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //XML PARSER BY BLIPI
- //Feel free to distribute and use it on any plattform and projects
- #ifndef XMLPARSER_H
- #define XMLPARSER_H
- #include <stdio.h>
- #include <stdlib.h>
- #include <malloc.h>
- #include <string.h>
- typedef struct xml_node_attr{
- char *name;
- char *value;
- struct xml_node_attr *next;
- }xml_node_attr;
- typedef struct xml_node{
- char *name;
- char *value;
- int level;
- long start_pos;
- long end_pos;
- char closed;
- struct xml_node_attr *attrs;
- struct xml_node *next;
- struct xml_node *last;
- struct xml_node *child;
- struct xml_node *parent;
- }xml_node;
- int XML_Open(char *path);
- struct xml_node *XML_ParseAll();
- struct xml_node *XML_SearchNodeFrom(char *name, struct xml_node *start);
- struct xml_node *XML_SearchNode(char *name);
- struct xml_node *XML_GetChild(struct xml_node *node);
- struct xml_node *XML_GetNextNode(struct xml_node *node);
- struct xml_node_attr *XML_GetNodeAttr(struct xml_node *node, char *name);
- char *XML_GetNodeValue(struct xml_node *node);
- void XML_EndParse(char free_tree);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment