-
Notifications
You must be signed in to change notification settings - Fork 84
API_xar_subdoc_remove
Rob Braun edited this page Jan 28, 2007
·
1 revision
Removes and deallocates a subdocument from a xarchive
xar_subdoc_remove() removes and frees a subdocument from a XAR archive. The entire subdocument is removed, all children, properties, attributes, etc. associated with the subdocument are removed.
#include <xar/xar.h>
int main(int argc, char *argv[]) {
xar_t x;
xar_subdoc_t s;
x = xar_open(argv[1], WRITE);
if( x == NULL ) {
fprintf(stderr, "Error opening xarchive: %s\n", argv[1]);
exit(1);
}
s = xar_subdoc_first(x);
if( s )
xar_subdoc_remove(s);
...
xar_close(x);
...
}