24 cout <<
"Error: no data found in Parser object" << endl;
29 tout <<
"<?xml version=\"1.0\"?>" << endl
30 <<
"<CLERK_REPORT>" << endl;
33 for(
unsigned int i = 0; i < libObj->
shows.size(); i++ )
36 tout <<
" <SHOW>" << endl
37 <<
" <SHOWNAME>" << libObj->
shows[i].getShowname() <<
"</SHOWNAME>" << endl;
40 for(
unsigned int j = 0; j < libObj->
shows[i].seasons.size(); j++ )
43 for(
unsigned int k = 0; k < libObj->
shows[i].seasons[j].episodes.size(); k++ )
45 tout <<
" <FILE>" << endl
46 <<
" <SEASON>" << libObj->
shows[i].seasons[j].getNumber() <<
"</SEASON>" << endl
47 <<
" <EPISODE>" << libObj->
shows[i].seasons[j].episodes[k].getNumber();
50 if( libObj->
shows[i].seasons[j].episodes[k].getExtra() > 0 )
52 tout << libObj->
shows[i].seasons[j].episodes[k].getExtra();
56 if( libObj->
shows[i].seasons[j].episodes[k].getPart() !=
"" )
58 tout << libObj->
shows[i].seasons[j].episodes[k].getPart();
61 tout <<
"</EPISODE>" << endl
62 <<
" <TITLE>" <<
xmlParse( libObj->
shows[i].seasons[j].episodes[k].getTitle() ) <<
"</TITLE>" << endl
63 <<
" <LOCATION>" << libObj->
shows[i].seasons[j].episodes[k].getOldDir() <<
"</LOCATION>" << endl
64 <<
" <FILENAME>" <<
xmlParse( libObj->
shows[i].seasons[j].episodes[k].getOldFile() ) <<
"</FILENAME>" << endl
65 <<
" </FILE>" << endl;
69 tout <<
" </SHOW>" << endl;
72 tout <<
"</CLERK_REPORT>" << endl;
82 string xmlAmp =
"amp;";
83 unsigned int xmlPos = xmlString.find(
"&" );
85 while( xmlPos < xmlString.length() )
87 xmlString.insert( xmlPos+1, xmlAmp );
88 xmlPos = xmlString.find(
"&", xmlPos+1 );
The OutPut class prints summary and error information from objects.
static string xmlParse(string)
Replaces "&" with xml "&" in a given string.
vector< Show > shows
A vector that holds each Show.
static void outputXML(Library *, ostream &)
Outputs summary information from objects in XML format.
Stores all info required to describe all shows.