wpa_supplicant / hostapd
2.5
|
UPnP XML helper routines Copyright (c) 2006-2007 Sony Corporation Copyright (c) 2008-2009 Atheros Communications Copyright (c) 2009, Jouni Malinen j@w1. fiMore...
#include "http.h"
Go to the source code of this file.
Functions | |
void | xml_data_encode (struct wpabuf *buf, const char *data, int len) |
void | xml_add_tagged_data (struct wpabuf *buf, const char *tag, const char *data) |
int | xml_next_tag (const char *in, const char **out, const char **out_tagname, const char **end) |
Advance to next tag. More... | |
char * | xml_get_first_item (const char *doc, const char *item) |
struct wpabuf * | xml_get_base64_item (const char *data, const char *name, enum http_reply_code *ret) |
UPnP XML helper routines Copyright (c) 2006-2007 Sony Corporation Copyright (c) 2008-2009 Atheros Communications Copyright (c) 2009, Jouni Malinen j@w1. fi
See wps_upnp.c for more details on licensing and code history.
int xml_next_tag | ( | const char * | in, |
const char ** | out, | ||
const char ** | out_tagname, | ||
const char ** | end | ||
) |
Advance to next tag.
in | Input |
out | OUT: start of tag just after '<' |
out_tagname | OUT: start of name of tag, skipping namespace |
end | OUT: one after tag |
A tag has form: <left angle="" bracket>=""><...><right angle="" bracket>=""> Within the angle brackets, there is an optional leading forward slash (which makes the tag an ending tag), then an optional leading label (followed by colon) and then the tag name itself.
Note that angle brackets present in the original data must have been encoded as < and > so they will not trouble us.