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

Parse XML in Apex
Hi,
I am getting XML string from websrvice call. I want to parse that and update the custom object. I don't know how to parse the string like below.
<outloop status='success'><innerloop><value id='1242'></value></innerloop><error></error></outloop>
Pls. help.
Thanks,
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_XmlStream_reader.htm
HTHs,
http://code.google.com/p/visualforce-components/source/browse/trunk/XmlDom/src/unpackaged/classes/XMLDom.cls
enjoy!
Doc now located at:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_xml_XmlStream_reader.htm
pardon my ignorance, but could someone please explain how to use the XMLStreamReader to extract Contact info from the following xml string and put it into a contact object?
I can't figure out how to extract the text from an element of a specific attribute value, like <name> where part = 'last' so I can then assign that to contact.lastname