-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAxmlParser.h
More file actions
53 lines (40 loc) · 963 Bytes
/
AxmlParser.h
File metadata and controls
53 lines (40 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* AXML Parser
* https://github.com/claudxiao/AndTools
* Claud Xiao <iClaudXiao@gmail.com>
*/
#ifndef AXMLPARSER_H
#define AXMLPARSER_H
#include <stdint.h>
typedef enum{
AE_STARTDOC = 0,
AE_ENDDOC,
AE_STARTTAG,
AE_ENDTAG,
AE_TEXT,
AE_ERROR,
} AxmlEvent_t;
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
void *AxmlOpen(char *buffer, size_t size);
AxmlEvent_t AxmlNext(void *axml);
char *AxmlGetTagPrefix(void *axml);
char *AxmlGetTagName(void *axml);
int AxmlNewNamespace(void *axml);
char *AxmlGetNsPrefix(void *axml);
char *AxmlGetNsUri(void *axml);
uint32_t AxmlGetAttrCount(void *axml);
char *AxmlGetAttrPrefix(void *axml, uint32_t i);
char *AxmlGetAttrName(void *axml, uint32_t i);
char *AxmlGetAttrValue(void *axml, uint32_t i);
char *AxmlGetText(void *axml);
int AxmlClose(void *axml);
int AxmlToXml(char **outbuf, size_t *outsize, char *inbuf, size_t insize);
#ifdef __cplusplus
#if __cplusplus
};
#endif
#endif
#endif