Here's C++ XML application that works with Schema/DTD utilizing

Xerces-c and two Boost libraries (boost_regex and boost_date_time)

1. application makes use of standard C header <getopt.h>

static const struct option long_options[] =
{
 {"dom",		0, NULL, 'o'},
 {"sax",		0, NULL, 's'},
 {"dtd",		0, NULL, 'd'},
 {"help",		0, NULL, 'h'},
 { NULL,		0, NULL,  0 }
};

static const char* const short_options = "osdh";

2. to display usage and get user input:

geo@fermat:/home/work/cpp/geoxml$ ./geoxml

  Usage: geoxml [ options ]

  -o, --dom		use DOM Parser with Schema
  -s, --sax		use SAX Parser with Name Space
  -d, --dtd		use SAX Parser with DTD
  -h, --help		print this info

geo@fermat:/home/work/cpp/geoxml$

3. before validating team's xml file using team.xsd schema file:

geo@fermat:/home/work/cpp/geoxml$ ./geoxml -o

  *** DOM parser with Schema *** 

  geoteam.xml is valid team (complies with team.xsd)

geo@fermat:/home/work/cpp/geoxml$
4. it uses Xerces SAX parser with name space for parsing teams (geoteam-ns.xml)

defined in a certain name space (team.xsd):

geo@fermat:/home/work/cpp/geoxml$ ./geoxml -s

  *** SAX parser with Name Space *** 

 Staff
 {
  first = Winnie;
  last = The Pooh;
  date-of-birth = 1900-Apr-22;
  role = developer;
  manager =  Linus Torvalds (123)456-7788;
 }

 Staff
 {
  first = Mary;
  last = Poppins;
  date-of-birth = 1984-Oct-23;
  role = tester;
  manager =  Richard Stallman (904)611-1346;
 }

 Staff
 {
  first = George;
  last = Matveev;
  date-of-birth = 1964-Aug-22;
  role = lead;
  manager =  God Almighty (111)333-4567;
 }

geo@fermat:/home/work/cpp/geoxml$

5. as well as SAX parser with DTD for team (geo-team.dtd)

defined using old good dtd (team.dtd):

geo@fermat:/home/work/cpp/geoxml$ ./geoxml -d

  *** SAX parser with DTD *** 

 Staff
 {
  first = George;
  last = Bush;
  date-of-birth = 1944-Jun-15;
  role = pres;
  manager =  The Almighty (123)456-7890;
 }

 Staff
 {
  first = Hilary;
  last = Clinton;
  date-of-birth = 1954-Nov-05;
  role = secretary;
  manager =  Barak Obama (212)333-5566;
 }

 Staff
 {
  first = George;
  last = Matveev;
  date-of-birth = 1964-Aug-22;
  role = assistant;
  manager =  The Almighty (000)777-8888;
 }

geo@fermat:/home/work/cpp/geoxml$

6. application makes use of functionality available in Xerces-c parser:

#include <xercesc/sax2/SAX2XMLReader.hpp>
#include <xercesc/sax2/XMLReaderFactory.hpp>
#include <xercesc/sax2/Attributes.hpp>
#include <xercesc/sax2/DefaultHandler.hpp>

#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/util/PlatformUtils.hpp>

7. and two Boost libraries are used for date-time and regular expression parsing :

#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/regex.hpp>

You can download app build on Debian Wheezy with gcc version 4.7.2 (Debian 4.7.2-5)

with ALL xml/xsd/dtd/Makefile files from here.