File: xml.h

package info (click to toggle)
referencer 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,028 kB
  • ctags: 2,265
  • sloc: ansic: 32,973; cpp: 12,149; python: 1,314; xml: 1,258; sh: 1,154; makefile: 252
file content (42 lines) | stat: -rw-r--r-- 808 bytes parent folder | download | duplicates (6)
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
/*
 * xml.h
 *
 * Copyright (c) Chris Putnam 2004-7
 *
 * Source code released under the GPL
 *
 */
#ifndef XML_H
#define XML_H

#include "lists.h"
#include "newstr.h"

typedef struct xml_attrib {
	lists attrib;
	lists value;
} xml_attrib;

typedef struct xml {
	newstr *tag;
	newstr *value;
	xml_attrib *a;
	struct xml *down;
	struct xml *next;
#ifdef COUNT_TRAVERSAL
	int count;
#endif

} xml;

extern void xml_init( xml *x );
extern newstr * xml_getattrib( xml *node, char *attrib );
extern char * xml_findstart( char *buffer, char *tag );
extern char * xml_findend( char *buffer, char *tag );
extern int xml_tagexact( xml *node, char *s );
extern int xml_tag_attrib( xml *node, char *s, char *attrib, char *value );
extern void xml_free( xml *x );
extern char * xml_tree( char *p, xml *onode );

#endif