In the documentation that snippet should it not use ScopedPointer?
XmlDocument myDocument (File ("myfile.xml"));
XmlElement* mainElement = myDocument.getDocumentElement();
ScopedPointer < XmlElement > mainElement (myDocument.getDocumentElement());
Even if it is properly wrote that user code need to manage the memory allocated, it could be confusing.