Example #1
0
void info_xml_creator::output(FILE *out)
{
	m_output = out;

	// output the DTD
	fprintf(m_output, "<?xml version=\"1.0\"?>\n");
	astring dtd(s_dtd_string);
	dtd.replace(0,"__XML_ROOT__", emulator_info::get_xml_root());
	dtd.replace(0,"__XML_TOP__", emulator_info::get_xml_top());

	fprintf(m_output, "%s\n\n", dtd.cstr());

	// top-level tag
	fprintf(m_output, "<%s build=\"%s\" debug=\""
#ifdef MAME_DEBUG
		"yes"
#else
		"no"
#endif
		"\" mameconfig=\"%d\">\n",
		emulator_info::get_xml_root(),
		xml_normalize_string(build_version),
		CONFIG_VERSION
	);

	// iterate through the drivers, outputting one at a time
	while (m_drivlist.next())
		output_one();

	// output devices (both devices with roms and slot devices)
	output_devices();

	// close the top level tag
	fprintf(m_output, "</%s>\n",emulator_info::get_xml_root());
}
Example #2
0
void info_xml_creator::output(FILE *out)
{
	m_output = out;

	// output the DTD
	fprintf(m_output, "<?xml version=\"1.0\"?>\n");
	fprintf(m_output, "%s\n\n", s_dtd_string);

	// top-level tag
	fprintf(m_output, "<" XML_ROOT " build=\"%s\" debug=\""
#ifdef MAME_DEBUG
		"yes"
#else
		"no"
#endif
		"\" mameconfig=\"%d\">\n",
		xml_normalize_string(build_version),
		CONFIG_VERSION
	);

	// iterate through the drivers, outputting one at a time
	while (m_drivlist.next())
		output_one();

	// close the top level tag
	fprintf(m_output, "</" XML_ROOT ">\n");
}