Firstly, a combination of external and internal objects is "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ <!ENTITY nbsp " "> ]not needed, because it http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdincludes www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent, which includes <!ENTITY nbsp " ">, which is exactly the same as yours.
So the bit should only be:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Secondly, XDocument does not check DTD by default. However, you can Loadwith XmlValidatingReaderor XmlTextReaderwith the appropriate settings
If possible, [ , !], XmlReader XmlPreloadedResolver, W3C URI DTD .ent , , , ( " ", , , ). , .