Original: He was shocked by Germany's capitulation in November 1918 even while the German army still held enemy territory.
Simplified: After the capitulation of Germany, Hitler was shocked, because the German army still held enemy area in November 1918.