summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/parser/performance
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-examples/cxx/parser/performance')
-rw-r--r--xsd-examples/cxx/parser/performance/.gitignore7
-rw-r--r--xsd-examples/cxx/parser/performance/README46
-rw-r--r--xsd-examples/cxx/parser/performance/buildfile57
-rw-r--r--xsd-examples/cxx/parser/performance/driver.cxx346
-rw-r--r--xsd-examples/cxx/parser/performance/gen.cxx79
-rw-r--r--xsd-examples/cxx/parser/performance/gen.testscript9
-rw-r--r--xsd-examples/cxx/parser/performance/test-50k.xml1
-rw-r--r--xsd-examples/cxx/parser/performance/test.xsd49
-rw-r--r--xsd-examples/cxx/parser/performance/time.cxx46
-rw-r--r--xsd-examples/cxx/parser/performance/time.hxx110
10 files changed, 750 insertions, 0 deletions
diff --git a/xsd-examples/cxx/parser/performance/.gitignore b/xsd-examples/cxx/parser/performance/.gitignore
new file mode 100644
index 0000000..19c9761
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/.gitignore
@@ -0,0 +1,7 @@
+driver-expat
+driver-xerces
+gen
+
+# Testscript output directory (can be symlink).
+#
+test-gen
diff --git a/xsd-examples/cxx/parser/performance/README b/xsd-examples/cxx/parser/performance/README
new file mode 100644
index 0000000..46137d0
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/README
@@ -0,0 +1,46 @@
+This example measures the performance of XML parsing in the C++/Parser
+mapping. It also shows how to structure your code to achieve the maximum
+performance for this operation.
+
+The example consists of the following files:
+
+test.xsd
+ XML Schema which describes the test vocabulary.
+
+test-50k.xml
+ Test XML document.
+
+gen.cxx
+ Program to generate a test document of desired size.
+
+time.hxx
+time.cxx
+ Class definition that represents time.
+
+test-pskel.hxx
+test-pskel.ixx
+test-pskel.cxx
+ Parser skeletons generated by the XSD compiler from test.xsd.
+
+driver.cxx
+ Driver for the example. It first parses the command line arguments
+ and reads the entire document into a memory buffer. It then creates
+ a SAX parser and pre-parses and caches the schema if validation is
+ enabled (Xerces-C++ only). Finally, it runs the performance
+ measurement loop which on each iteration parses the XML document
+ from the in-memory buffer.
+
+To run the example on a test XML document simply execute:
+
+$ ./driver test-50k.xml
+
+The -v option can be used to turn on validation in the underlying XML
+parser (only makes sense for Xerces-C++, off by default). The -i option
+can be used to specify the number of parsing iterations (1000 by default).
+For example:
+
+$ ./driver -v -i 100 test-50k.xml
+
+To generate the test document execute, for example:
+
+$ ./gen 633 test-100k.xml
diff --git a/xsd-examples/cxx/parser/performance/buildfile b/xsd-examples/cxx/parser/performance/buildfile
new file mode 100644
index 0000000..10111d6
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/buildfile
@@ -0,0 +1,57 @@
+# file : cxx/parser/performance/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+
+import libxerces = libxerces-c%lib{xerces-c}
+import libexpat = libexpat%lib{expat}
+
+./: doc{README}
+
+# exe{driver-{xerces,expat}}
+#
+for p: 'xerces' 'expat'
+{
+ # Make sure that obje{time} doesn't depend on the parser library that varies
+ # for different exe{driver-*} targets. Think of -I... options passed to the
+ # compiler while compiling time.cxx, which would vary depending on exe
+ # target time.cxx is a prerequisite of.
+ #
+ ./: exe{driver-$p}: obje{driver-$p time} \
+ {hxx ixx cxx}{test-$p-pskel} \
+ $libs $(lib$p)
+
+ exe{driver-$p}: xml{test-50k}: test.input = true
+
+ obje{driver-$p}: cxx{driver} $libs $(lib$p)
+
+ <{hxx ixx cxx}{test-$p-pskel}>: xsd{test} $xsd
+ {
+ # Note: we can't use $p in the buildscript since it will be substituted by
+ # the latest $p value.
+ #
+ parser = $p
+ }
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -$parser-pskel \
+ --xml-parser $parser \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+obje{time}: {hxx cxx}{time}
+
+# exe{gen}
+#
+./: exe{gen}: cxx{gen} testscript{gen}
+
+# Build options.
+#
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+obje{driver-xerces}: cxx.poptions += -DXERCES_PARSER
diff --git a/xsd-examples/cxx/parser/performance/driver.cxx b/xsd-examples/cxx/parser/performance/driver.cxx
new file mode 100644
index 0000000..4ac0265
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/driver.cxx
@@ -0,0 +1,346 @@
+// file : cxx/parser/performance/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <string>
+#include <memory> // std::unique_ptr
+#include <cstddef> // std::size_t
+#include <fstream>
+#include <sstream>
+#include <iostream>
+
+#include "time.hxx"
+
+#ifdef XERCES_PARSER
+# include "test-xerces-pskel.hxx"
+
+# include <xercesc/sax2/SAX2XMLReader.hpp>
+# include <xercesc/sax2/XMLReaderFactory.hpp>
+# include <xercesc/framework/MemBufInputSource.hpp>
+# include <xercesc/validators/common/Grammar.hpp>
+# include <xercesc/util/PlatformUtils.hpp>
+# include <xercesc/util/XMLUni.hpp>
+
+# include <xsd/cxx/xml/sax/bits/error-handler-proxy.hxx>
+# include <xsd/cxx/parser/error-handler.hxx>
+#else
+# include "test-expat-pskel.hxx"
+#endif
+
+// No-op parser implementation.
+//
+namespace test
+{
+ struct enum_pimpl: enum_pskel, xml_schema::string_pimpl
+ {
+ virtual void
+ post_enum ()
+ {
+ }
+ };
+
+ struct record_pimpl: record_pskel
+ {
+ virtual void
+ int_ (unsigned int)
+ {
+ }
+
+ virtual void
+ double_ (double)
+ {
+ }
+
+ virtual void
+ name (const std::string&)
+ {
+ }
+
+ virtual void
+ string (const std::string&)
+ {
+ }
+
+ virtual void
+ choice1 (const std::string&)
+ {
+ }
+
+ virtual void
+ choice2 (const std::string&)
+ {
+ }
+
+ virtual void
+ choice3 (const std::string&)
+ {
+ }
+
+ virtual void
+ choice4 (const std::string&)
+ {
+ }
+
+ virtual void
+ apple (bool)
+ {
+ }
+
+ virtual void
+ orange (unsigned long long)
+ {
+ }
+ };
+
+ struct root_pimpl: root_pskel
+ {
+ };
+}
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc < 2)
+ {
+ cerr << "usage: " << argv[0] << " [-v] [-i <count>] test.xml" << endl
+ << "\t -v turn on validation (default is off)" << endl
+ << "\t -i number of iterations to perform (default is 1000)" << endl;
+ return 1;
+ }
+
+ bool validate (false);
+ unsigned long iter (1000);
+ const char* file (0);
+
+ // Parse command line arguments.
+ //
+ for (int i (1); i < argc; ++i)
+ {
+ string arg (argv[i]);
+
+ if (arg == "-v")
+ {
+ validate = true;
+ }
+ else if (arg == "-i")
+ {
+ if (++i == argc)
+ {
+ cerr << "argument expected for the -i option" << endl;
+ return 1;
+ }
+
+ iter = 0;
+ istringstream is (argv[i]);
+ is >> iter;
+
+ if (iter == 0)
+ {
+ cerr << "invalid argument for the -i option" << endl;
+ return 1;
+ }
+ }
+ else
+ {
+ file = argv[i];
+ break;
+ }
+ }
+
+ if (file == 0)
+ {
+ cerr << "no input file specified" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Instantiate and connect parsers.
+ //
+ xml_schema::unsigned_int_pimpl unsigned_int_p;
+ xml_schema::double_pimpl double_p;
+ xml_schema::ncname_pimpl ncname_p;
+ xml_schema::string_pimpl string_p;
+ xml_schema::boolean_pimpl boolean_p;
+ xml_schema::unsigned_long_pimpl unsigned_long_p;
+
+ test::enum_pimpl enum_p;
+ test::record_pimpl record_p;
+ test::root_pimpl root_p;
+
+ record_p.parsers (unsigned_int_p,
+ double_p,
+ ncname_p,
+ string_p,
+ string_p,
+ string_p,
+ string_p,
+ string_p,
+ enum_p,
+ boolean_p,
+ unsigned_long_p);
+
+ root_p.parsers (record_p);
+
+ // Read the fine into in-memory buffer.
+ //
+ ifstream ifs;
+ ifs.exceptions (ios_base::failbit);
+ ifs.open (file, ios::in | ios::ate);
+
+ size_t size (ifs.tellg ());
+ ifs.seekg (0, ios::beg);
+
+ char* buf = new char[size];
+ ifs.read (buf, size);
+ ifs.close ();
+
+ cerr << "document size: " << size << " bytes" << endl
+ << "iterations: " << iter << endl;
+
+ os::time time (0);
+ xml_schema::document doc (root_p, "test", "root");
+
+#ifdef _XERCES_VERSION
+
+ // Xerces-C++ as the underlying XML parser.
+ //
+ using namespace xercesc;
+
+ namespace xml = xsd::cxx::xml;
+ namespace parser = xsd::cxx::parser;
+
+ XMLPlatformUtils::Initialize ();
+
+ {
+ MemBufInputSource is (
+ reinterpret_cast<XMLByte*> (buf), size, file, false);
+ is.setCopyBufToStream (false);
+
+ unique_ptr<SAX2XMLReader> parser (XMLReaderFactory::createXMLReader ());
+
+ parser->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
+ parser->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
+ parser->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
+
+ if (validate)
+ {
+ parser->setFeature (XMLUni::fgSAX2CoreValidation, true);
+ parser->setFeature (XMLUni::fgXercesSchema, true);
+ parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ parser->setFeature (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // Initialize the schema cache. To detect schema errors we will
+ // need an error handler.
+ //
+ parser::error_handler<char> eh;
+ xml::sax::bits::error_handler_proxy<char> ehp (eh);
+ parser->setErrorHandler (&ehp);
+
+ if (!parser->loadGrammar ("test.xsd", Grammar::SchemaGrammarType, true))
+ {
+ // In Xerces-C++ grammar loading failure results in just a warning.
+ // Make it a fatal error.
+ //
+ eh.handle ("test.xsd", 0, 0,
+ parser::error_handler<char>::severity::fatal,
+ "unable to load schema");
+ }
+
+ eh.throw_if_failed ();
+ parser->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true);
+
+#if _XERCES_VERSION >= 30100
+ parser->setFeature (XMLUni::fgXercesLoadSchema, false);
+#endif
+ }
+ else
+ {
+ parser->setFeature (XMLUni::fgSAX2CoreValidation, false);
+ parser->setFeature (XMLUni::fgXercesSchema, false);
+ parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
+ }
+
+ os::time start;
+
+ for (unsigned long i (0); i < iter; ++i)
+ {
+ root_p.pre ();
+ doc.parse (is, *parser);
+ root_p.post_root ();
+ }
+
+ os::time end;
+ time = end - start;
+ }
+
+ XMLPlatformUtils::Terminate ();
+
+#else
+
+ XSD_UNUSED (validate);
+
+ // Expat as the underlying XML parser.
+ //
+ XML_Parser xml_parser (XML_ParserCreateNS (0, ' '));
+ string public_id (file);
+
+ os::time start;
+
+ for (unsigned long i (0); i < iter; ++i)
+ {
+ // Using the low-level Expat-specific API to parse the memory
+ // buffer.
+ //
+ root_p.pre ();
+ doc.parse_begin (xml_parser, public_id);
+
+ XML_Parse (xml_parser, buf, size, 1);
+
+ doc.parse_end ();
+ root_p.post_root ();
+
+ XML_ParserReset (xml_parser, 0);
+ }
+
+ os::time end;
+ time = end - start;
+
+ XML_ParserFree (xml_parser);
+
+#endif
+
+ delete[] buf;
+
+ cerr << "time: " << time << " sec" << endl;
+
+ double ms (time.sec () * 1000000ULL + time.nsec () / 1000ULL);
+
+ // Calculate throughput in documents/sec.
+ //
+ double tpd ((iter / ms) * 1000000);
+ cerr << "throughput: " << tpd << " documents/sec" << endl;
+
+ // Calculate throughput in MBytes/sec.
+ //
+ double tpb (((size * iter) / ms) * 1000000/(1024*1024));
+ cerr << "throughput: " << tpb << " MBytes/sec" << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/performance/gen.cxx b/xsd-examples/cxx/parser/performance/gen.cxx
new file mode 100644
index 0000000..5c11343
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/gen.cxx
@@ -0,0 +1,79 @@
+// file : cxx/parser/performance/gen.cxx
+// copyright : not copyrighted - public domain
+
+#include <fstream>
+#include <sstream>
+#include <iostream>
+
+using namespace std;
+
+static const char* enums[] =
+{
+ "romance",
+ "fiction",
+ "horror",
+ "history",
+ "philosophy"
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 3)
+ {
+ cerr << "usage: " << argv[0] << " <count> <output-file>" << endl;
+ return 1;
+ }
+
+ unsigned long n (0);
+ istringstream is (argv[1]);
+ is >> n;
+
+ if (n == 0)
+ {
+ cerr << "record count argument should be a positive number" << endl;
+ return 1;
+ }
+
+ ofstream ofs (argv[2]);
+
+ if (!ofs.is_open ())
+ {
+ cerr << "unable to open '" << argv[2] << "' in write mode" << endl;
+ return 1;
+ }
+
+ ofs << "<t:root xmlns:t='test' " <<
+ "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " <<
+ "xsi:schemaLocation='test test.xsd'>";
+
+ unsigned short ch (1), en (0);
+
+ for (unsigned long i (0); i < n; ++i)
+ {
+ ofs << "<record orange=\"" << i << "\"";
+
+ if (i % 2 == 0)
+ ofs << " apple=\"true\"";
+
+ ofs << ">"
+ << "<int>42</int>"
+ << "<double>42345.4232</double>"
+ << "<name>name123_45</name>";
+
+ if (i % 2 == 1)
+ ofs << "<string>one two three</string>";
+
+ ofs << "<choice" << ch << ">" << ch << " choice</choice" << ch << ">"
+ << "<enum>" << enums[en] << "</enum>"
+ << "</record>";
+
+ if (++ch > 4)
+ ch = 1;
+
+ if (++en > 4)
+ en = 0;
+ }
+
+ ofs << "</t:root>";
+}
diff --git a/xsd-examples/cxx/parser/performance/gen.testscript b/xsd-examples/cxx/parser/performance/gen.testscript
new file mode 100644
index 0000000..1dc6d66
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/gen.testscript
@@ -0,0 +1,9 @@
+# file : cxx/parser/performance/gen.testscript
+# license : not copyrighted - public domain
+
+: 50k
+:
+{
+ $* 317 test-50k.xml &test-50k.xml;
+ cat test-50k.xml >>>$src_base/test-50k.xml
+}
diff --git a/xsd-examples/cxx/parser/performance/test-50k.xml b/xsd-examples/cxx/parser/performance/test-50k.xml
new file mode 100644
index 0000000..42e22f3
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/test-50k.xml
@@ -0,0 +1 @@
+<t:root xmlns:t='test' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='test test.xsd'><record orange="0" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="1"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="2" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="3"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="4" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="5"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="6" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="7"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="8" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="9"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="10" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="11"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="12" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="13"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="14" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="15"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="16" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="17"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="18" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="19"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="20" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="21"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="22" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="23"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="24" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="25"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="26" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="27"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="28" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="29"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="30" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="31"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="32" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="33"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="34" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="35"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="36" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="37"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="38" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="39"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="40" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="41"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="42" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="43"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="44" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="45"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="46" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="47"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="48" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="49"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="50" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="51"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="52" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="53"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="54" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="55"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="56" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="57"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="58" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="59"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="60" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="61"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="62" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="63"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="64" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="65"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="66" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="67"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="68" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="69"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="70" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="71"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="72" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="73"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="74" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="75"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="76" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="77"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="78" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="79"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="80" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="81"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="82" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="83"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="84" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="85"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="86" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="87"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="88" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="89"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="90" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="91"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="92" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="93"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="94" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="95"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="96" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="97"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="98" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="99"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="100" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="101"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="102" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="103"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="104" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="105"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="106" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="107"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="108" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="109"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="110" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="111"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="112" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="113"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="114" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="115"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="116" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="117"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="118" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="119"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="120" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="121"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="122" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="123"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="124" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="125"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="126" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="127"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="128" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="129"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="130" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="131"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="132" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="133"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="134" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="135"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="136" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="137"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="138" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="139"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="140" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="141"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="142" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="143"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="144" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="145"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="146" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="147"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="148" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="149"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="150" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="151"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="152" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="153"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="154" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="155"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="156" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="157"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="158" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="159"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="160" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="161"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="162" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="163"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="164" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="165"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="166" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="167"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="168" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="169"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="170" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="171"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="172" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="173"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="174" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="175"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="176" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="177"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="178" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="179"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="180" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="181"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="182" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="183"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="184" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="185"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="186" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="187"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="188" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="189"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="190" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="191"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="192" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="193"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="194" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="195"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="196" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="197"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="198" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="199"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="200" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="201"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="202" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="203"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="204" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="205"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="206" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="207"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="208" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="209"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="210" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="211"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="212" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="213"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="214" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="215"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="216" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="217"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="218" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="219"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="220" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="221"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="222" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="223"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="224" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="225"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="226" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="227"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="228" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="229"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="230" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="231"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="232" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="233"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="234" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="235"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="236" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="237"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="238" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="239"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="240" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="241"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="242" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="243"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="244" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="245"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="246" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="247"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="248" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="249"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="250" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="251"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="252" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="253"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="254" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="255"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="256" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="257"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="258" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="259"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="260" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="261"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="262" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="263"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="264" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="265"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="266" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="267"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="268" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="269"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="270" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="271"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="272" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="273"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="274" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="275"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="276" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="277"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="278" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="279"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="280" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="281"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="282" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="283"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="284" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="285"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="286" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="287"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="288" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="289"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="290" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="291"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="292" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="293"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="294" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="295"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="296" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record><record orange="297"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>horror</enum></record><record orange="298" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>history</enum></record><record orange="299"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>philosophy</enum></record><record orange="300" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>romance</enum></record><record orange="301"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>fiction</enum></record><record orange="302" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>horror</enum></record><record orange="303"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>history</enum></record><record orange="304" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>philosophy</enum></record><record orange="305"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>romance</enum></record><record orange="306" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>fiction</enum></record><record orange="307"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>horror</enum></record><record orange="308" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>history</enum></record><record orange="309"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>philosophy</enum></record><record orange="310" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>romance</enum></record><record orange="311"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>fiction</enum></record><record orange="312" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>horror</enum></record><record orange="313"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice2>2 choice</choice2><enum>history</enum></record><record orange="314" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice3>3 choice</choice3><enum>philosophy</enum></record><record orange="315"><int>42</int><double>42345.4232</double><name>name123_45</name><string>one two three</string><choice4>4 choice</choice4><enum>romance</enum></record><record orange="316" apple="true"><int>42</int><double>42345.4232</double><name>name123_45</name><choice1>1 choice</choice1><enum>fiction</enum></record></t:root> \ No newline at end of file
diff --git a/xsd-examples/cxx/parser/performance/test.xsd b/xsd-examples/cxx/parser/performance/test.xsd
new file mode 100644
index 0000000..450a800
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/test.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/performance/test.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<schema targetNamespace="test" xmlns:t="test"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <simpleType name="enum">
+ <restriction base="string">
+ <enumeration value="romance"/>
+ <enumeration value="fiction"/>
+ <enumeration value="horror"/>
+ <enumeration value="history"/>
+ <enumeration value="philosophy"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="record">
+ <sequence>
+ <element name="int" type="unsignedInt"/>
+ <element name="double" type="double"/>
+ <element name="name" type="NCName"/>
+ <element name="string" type="string" minOccurs="0" maxOccurs="1"/>
+ <choice>
+ <element name="choice1" type="string"/>
+ <element name="choice2" type="string"/>
+ <element name="choice3" type="string"/>
+ <element name="choice4" type="string"/>
+ </choice>
+ <element name="enum" type="t:enum"/>
+ </sequence>
+ <attribute name="apple" type="boolean"/>
+ <attribute name="orange" type="unsignedLong" use="required"/>
+ </complexType>
+
+ <complexType name="root">
+ <sequence>
+ <element name="record" type="t:record" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <element name="root" type="t:root"/>
+
+</schema>
diff --git a/xsd-examples/cxx/parser/performance/time.cxx b/xsd-examples/cxx/parser/performance/time.cxx
new file mode 100644
index 0000000..c8c1002
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/time.cxx
@@ -0,0 +1,46 @@
+// file : cxx/parser/performance/time.cxx
+// copyright : not copyrighted - public domain
+
+#include "time.hxx"
+
+#if defined (WIN32) || defined (__WIN32__)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h> // GetSystemTimeAsFileTime
+#else
+# include <time.h> // gettimeofday
+# include <sys/time.h> // timeval
+#endif
+
+#include <ostream> // std::ostream
+#include <iomanip> // std::setfill, std::setw
+
+namespace os
+{
+ time::
+ time ()
+ {
+#if defined (WIN32) || defined (__WIN32__)
+ FILETIME ft;
+ GetSystemTimeAsFileTime (&ft);
+ unsigned long long v (
+ ((unsigned long long) (ft.dwHighDateTime) << 32) + ft.dwLowDateTime);
+
+ sec_ = static_cast<unsigned long> (v / 10000000ULL);
+ nsec_ = static_cast<unsigned long> ((v % 10000000ULL) * 100);
+#else
+ timeval tv;
+ if (gettimeofday(&tv, 0) != 0)
+ throw failed ();
+
+ sec_ = static_cast<unsigned long> (tv.tv_sec);
+ nsec_ = static_cast<unsigned long> (tv.tv_usec * 1000);
+#endif
+ }
+
+ std::ostream&
+ operator<< (std::ostream& o, time const& t)
+ {
+ return o << t.sec () << '.'
+ << std::setfill ('0') << std::setw (9) << t.nsec ();
+ }
+}
diff --git a/xsd-examples/cxx/parser/performance/time.hxx b/xsd-examples/cxx/parser/performance/time.hxx
new file mode 100644
index 0000000..a22f671
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/time.hxx
@@ -0,0 +1,110 @@
+// file : cxx/parser/performance/time.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef TIME_HXX
+#define TIME_HXX
+
+#include <iosfwd> // std::ostream&
+
+namespace os
+{
+ class time
+ {
+ public:
+ class failed {};
+
+ // Create a time object representing the current time.
+ //
+ time ();
+
+ time (unsigned long long nsec)
+ {
+ sec_ = static_cast<unsigned long> (nsec / 1000000000ULL);
+ nsec_ = static_cast<unsigned long> (nsec % 1000000000ULL);
+ }
+
+ time (unsigned long sec, unsigned long nsec)
+ {
+ sec_ = sec;
+ nsec_ = nsec;
+ }
+
+ public:
+ unsigned long
+ sec () const
+ {
+ return sec_;
+ }
+
+ unsigned long
+ nsec () const
+ {
+ return nsec_;
+ }
+
+ public:
+ class overflow {};
+ class underflow {};
+
+ time
+ operator+= (time const& b)
+ {
+ unsigned long long tmp = 0ULL + nsec_ + b.nsec_;
+
+ sec_ += static_cast<unsigned long> (b.sec_ + tmp / 1000000000ULL);
+ nsec_ = static_cast<unsigned long> (tmp % 1000000000ULL);
+
+ return *this;
+ }
+
+ time
+ operator-= (time const& b)
+ {
+ if (*this < b)
+ throw underflow ();
+
+ sec_ -= b.sec_;
+
+ if (nsec_ < b.nsec_)
+ {
+ --sec_;
+ nsec_ += 1000000000ULL - b.nsec_;
+ }
+ else
+ nsec_ -= b.nsec_;
+
+ return *this;
+ }
+
+ friend time
+ operator+ (time const& a, time const& b)
+ {
+ time r (a);
+ r += b;
+ return r;
+ }
+
+ friend time
+ operator- (time const& a, time const& b)
+ {
+ time r (a);
+ r -= b;
+ return r;
+ }
+
+ friend bool
+ operator < (time const& a, time const& b)
+ {
+ return (a.sec_ < b.sec_) || (a.sec_ == b.sec_ && a.nsec_ < b.nsec_);
+ }
+
+ private:
+ unsigned long sec_;
+ unsigned long nsec_;
+ };
+
+ std::ostream&
+ operator<< (std::ostream&, time const&);
+}
+
+#endif // TIME_HXX