 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
20 "Usage: bxml [options] input.xml [input.xml]",
21 "-------------------------------------------",
22 "Reads, writes and validates XML files.",
25 "-verbose 7 Verbosity of output.",
28 "-validate mg.xsd Validate XML input file(s) with this schema.",
31 "-output file.xml Output XML format file.",
36 int main(
int argc,
char **argv)
45 for ( curropt = option; curropt; curropt = curropt->
next ) {
46 if ( curropt->
tag ==
"validate" )
48 if ( curropt->
tag ==
"output" )
57 while ( optind < argc )
string_add(&file_list, argv[optind++]);
59 cerr <<
"Error: No XML files specified!" << endl;
66 for ( thisfile = file_list; thisfile; thisfile = thisfile->
next ) {
67 doc = xmlParseFile(thisfile->
c_str());
69 cerr <<
"Error: " << *thisfile <<
" not parsed!" << endl;
73 cout <<
"# Reading file: " << *thisfile << endl;
76 if ( outfile.
length() ) xmlSaveFormatFile(outfile.
c_str(), doc, 1);
A class for a command line input option.
Reads and writes micrograph XML files.
int bexit(int value)
Exit function for cleanup and debugging.
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Header file for option handlers.
int xml_validate(const xmlDocPtr doc, Bstring &xsdfile)
Utilities for timing functions.
int main(int argc, char **argv)
double timer_start()
Starts timer and prints the time.
Header file for general utilities.
double timer_report(double lasttime)
Reports the time elapsed since a given time.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.