I was provided an XML schema that (I think) I should be able to utilize to build out the XML string that I need to send to a web service.
The two documented items in the Apex Developer Guide talk about using the DOM to generate XML and using a WSDL to generate XML which neither is applicable to the schema file.
I am not entirely sure where to start and was hoping for someone to provide some resources or insight on using a schema to build out the xml. Is this even the purpose/ possible with the schema file? I imagine the process is something like a reader or parser goes through the schema file and pulls out the tags and then I would += these tags with the appropriate data to a new XML string.
Some resources I am ready through are: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_schema.htm https://www.webucator.com/tutorial/learn-xml-schema/xml-schema-basics.cfm https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_xml_dom.htm https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex_gen_code.htm
Thank you in advance!
Update: It looks like I can use a tool like: http://xsd2xml.com/ and it will create the XML template out of the schema. From here I would parse through the XML and update the values unless there is a better way.