shithub: snippets

ref: 3160d64112b0f517da51ad82ec4f00f0a5ebe6e3
dir: /xml.h/

View raw version
typedef struct Xelem Xelem;
typedef struct Xattr Xattr;

struct Xelem
{
	char  *n;
	char  *v;
	Xattr *a;
	Xelem *ch;
	Xelem *next;
	void  *priv;
};

struct Xattr
{
	char  *n;
	char  *v;
	Xattr *next;
};

enum
{
	Xmlstartonly = 1,
};

Xelem *xmlread(Biobuf *b, int flags);
void xmlfree(Xelem *x);
Xelem *xmlget(Xelem *x, char *path, ...);
Xattr *xmlgetattr(Xattr *a, char *n);
void xmlprint(Xelem *x, int fd);