rev
is not the child of root of tree. This is the path to it:
api
query
pages
page
revisions
rev
You can use .Descendants()
to reach it.
var entry = XDocument.Parse(html);
var g = entry.Descendants("rev").First().Value;