[Expat-discuss] [expat] newbie question

Jeffrey Holle jeffreyholle at bellsouth.net
Mon Apr 9 04:34:28 CEST 2007


I'm using expat 2.0.0 self build on Ubuntu Linux 5.10.

The program that I'm writing needs to process N XML files.
Note not nested, but in series.

My first attempt initializes the expat parser and feeds the data into it 
like this (pseudo code):

while(!files.eof())
{
   getline(files.filename);
   ifstream file(filename);
   do {
     char buffer[256];
     file.read(buffer,256);
     XML_Parse(parser,buffer,file.gcount(),0);
   } while (file.eof());
   XML_Parse(parser,NULL,0,1);
}

I have not shown it, but I do have an element handler enabled and it 
works as expected for the first file, but not subsequent ones.

What should I be doing to end one XML file parsing action and start another?



More information about the Expat-discuss mailing list