Under unix-type operating systems (incl. OSX), you could use the
csplit command, e.g.
csplit -f "chapters/" -b "%2.2d.xhtml" big_file.xhtml "/<h2/" "{*}"
That'll split your file into chapters/00.xhtml, chapters/01.xhtml, ...
However, everything before the first <h2> tag ends up in 00.xhtml, and the other files lack the enclosing <html><head>...</body></html> tags. Of course, a few shell commands can fix that, but I'll leave that as an exercise to the reader