You need to sign in to do that
Don't have an account?

Accessing content of static resources from within Apex code
Hi all. Quick question: is there any way to access the content of a static resource from Apex code?
I know how to access the resource inside VF markup (URLFOR, $Resource); what I'm trying to do here is get at the contents of an XML or text file resource from within an Apex method.
I couldn't find an API for doing this. The only thing I could think of was to do an HTTP callout, but that seems to give me a 404 no matter what I do; I gather there is a proxy back there that has a different view of the world than my browser does.
Is there a better way to go about this?
Thanks very much,
-p
I know how to access the resource inside VF markup (URLFOR, $Resource); what I'm trying to do here is get at the contents of an XML or text file resource from within an Apex method.
I couldn't find an API for doing this. The only thing I could think of was to do an HTTP callout, but that seems to give me a 404 no matter what I do; I gather there is a proxy back there that has a different view of the world than my browser does.
Is there a better way to go about this?
Thanks very much,
-p
All Answers
I have a question,
I have a flash SWF file that is referencing an XML - both are static resources. DO you know how to get the flashfile to look at the XML resource? i have done a direct Link in the actionscript but it just does not want to load it.
Any ideas?
Jason