@@ -46,7 +46,7 @@ namespace
4646{
4747
4848
49- struct ThisApplication : Application
49+ struct ThisApplication final : Application
5050{
5151 ThisApplication ()
5252 : Application (" Generate tab-delimited files for SQL bulk insert from XML files and their XML schema" )
@@ -56,6 +56,7 @@ struct ThisApplication : Application
5656 addPositional (" xml_num" , " XML file number" );
5757 addPositional (" schema" , " XML schema file" );
5858 addPositional (" out_dir" , " Directory for output tab-delimited files" );
59+ addFlag (" no_xml_header" , " XML file has no header" );
5960 }
6061
6162
@@ -66,6 +67,7 @@ struct ThisApplication : Application
6667 const size_t xml_num = str2<size_t > (getArg (" xml_num" ));
6768 const string schemaFName = getArg (" schema" );
6869 string dirName = getArg (" out_dir" );
70+ const bool headerP = ! getFlag (" no_xml_header" );
6971
7072 if (! isDirName (dirName))
7173 dirName += ' /' ;
@@ -78,7 +80,7 @@ struct ThisApplication : Application
7880 Names names (10000 ); // PAR
7981 VectorOwn<Xml_sp::Data> markupDeclarations;
8082 #if 1
81- unique_ptr<const Xml_sp::Data> xml (Xml_sp::Data::load (names, xmlFName, markupDeclarations));
83+ unique_ptr<const Xml_sp::Data> xml (Xml_sp::Data::load (headerP, names, xmlFName, markupDeclarations));
8284 #else
8385 unique_ptr<const Xml_sp::Data> xml;
8486 {
0 commit comments