Previous: Reading and writing QLA arrays, Up: I/O utilities
The file and record metadata is passed to QDP in QDP_string objects. These can be created, destroyed and converted to/from C strings with the following routines.
QDP_string
QDP_String *QDP_string_create(void);
fileinfo = QDP_string_create();
void QDP_string_destroy(QDP_String *xml);
QDP_string_destroy(xml);
void QDP_string_set(QDP_String *qstring, char *cstring);
cstring
QDP_string *fileinfo = QDP_string_create(); QDP_string_set(fileinfo, string);
void QDP_string_copy(QDP_String *dest, QDP_String *src);
QDP_string_copy(newxml, oldxml);
size_t QDP_string_length(QDP_String *qs);
length = QDP_string_length(xml);
char *QDP_string_ptr(QDP_String *qs);
printf("%sn", QDP_string_ptr(xml));