+ wxLogError(_("XRC resource '%s' (class '%s') not found!"),
+ name, classname);
+ }
+#if wxUSE_FILESYSTEM
+ else // node was found
+ {
+ // ensure that relative paths work correctly when loading this node
+ // (which should happen as soon as we return as FindResource() result
+ // is always passed to CreateResFromNode())
+ m_curFileSystem.ChangePathTo(path);
+ }
+#endif // wxUSE_FILESYSTEM
+
+ return node;
+}
+
+wxXmlNode *
+wxXmlResource::GetResourceNodeAndLocation(const wxString& name,
+ const wxString& classname,
+ bool recursive,
+ wxString *path) const
+{
+ // ensure everything is up-to-date: this is needed to support on-remand
+ // reloading of XRC files
+ const_cast<wxXmlResource *>(this)->UpdateResources();
+
+ for ( wxXmlResourceDataRecords::const_iterator f = Data().begin();
+ f != Data().end(); ++f )
+ {
+ wxXmlResourceDataRecord *const rec = *f;
+ wxXmlDocument * const doc = rec->Doc;
+ if ( !doc || !doc->GetRoot() )