You need to sign in to do that
Don't have an account?
sampath kumar 3
How to load and acess xml in apex and visualforce
I have an xml file ,Dont know how to load and retrive the xml file using Apex and to pass the xml to My visualforce page. I have gone through some of the exmaples related to this scenario which is a book list example . I didnt understand that can anyone explain to load and fetch data from xml using Apex
Try with below code.
Try to implement your XML file accordingly .
You need to convert your xml file to string then you can use .
Let me know if it helps !!
Thanks
Manoj
Basically are you working on webservice ? If you are working on webservice then you rresponse will come as a xml file .The response you need to load like below .
dom.Document doc = new dom.Document();
doc.load(requiredXml);
Here requiredXml is your response xml .Aftre that you need to parse .
check below class which is standard apex class ,which I have used for parsing .
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_xml_dom_xmlnode.htm
Thanks
Manoj
if possible post your response or send to my email I will check and let you know the issue .
Thanks
manoj