shithub: xmpp

ref: a5ac48e0d64d20fc0acef12f8639a5613a76c573
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,
};

typedef struct Biobuf Biobuf;

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

#pragma varargck type "Ӽ" char*
int xmlstrfmt(Fmt *f);