In Umbraco v4.5, GetMedia returns the documentElement of the XML, where in previous versions (v4.0.x and lower) it returned the firstChild.
The biggest problem is that this breaks backwards compatibility when upgrading from v4.0.x (with 'UseLegacyXmlSchema' enabled).
In both versions, the XML returned from GetMedia look the same - however the XPathNodeIterator is positioned at different nodes.
In v4.0.x, the XPathNavigator selects the firstChild...
e.g. return mXml.CreateNavigator().Select("/node");
In v4.5, the current node (document element / root) is selected...
e.g. return xd.CreateNavigator().Select("."); // this is returned from 'getMediaDo'
The problem could be corrected by setting the node position to the firstChild... like so:
return xd.CreateNavigator().Select("/*");
Regards,
- Lee