how to represent an exist directory into an XML file ??
is there any system call to do that or there is a good built in library to use it ???

I wrote this

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

 int main ( int argc, char *argv[])
{

int len;
struct dirent *pDirent;
DIR *pDir;

if (argc < 2) 
{
printf (" <dirname>\n");
return 1 ;
} 

pDir=opendir([1]);
if (pDir ==NULL){
printf("cannot open directory'%s' ,v[1]);
return 1;

}

  return 0;
}

any help ??!

extract the directory name from the xml file then use that instead of argv[1] in line 22.