Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ytsutano committed May 3, 2017
1 parent 6730642 commit 2ab8cc2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
*/

#include <iostream>
#include <fstream>
#include <vector>
#include <string>

#include "jitana/util/axml_parser.hpp"

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/parsers.hpp>
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options.hpp>

void process_xml(std::ostream& os, const std::string& filename)
{
// Construct a property tree from the input XML file.
boost::property_tree::ptree pt;
try {
// First, try to read as a binary XML file.
Expand All @@ -38,8 +38,9 @@ void process_xml(std::ostream& os, const std::string& filename)
boost::property_tree::read_xml(filename, pt);
}

// Write the ptree to the output.
boost::property_tree::xml_writer_settings<std::string> settings(' ', 2);
write_xml(os, pt, settings);
boost::property_tree::write_xml(os, pt, settings);
}

int main(int argc, char** argv)
Expand Down

0 comments on commit 2ab8cc2

Please sign in to comment.