-1

How do I form an XML data string from the APEX queries ?

Any particular class I should be using ?

Hrishikesh Choudhari
  • 11,617
  • 18
  • 61
  • 74
  • I'm not sure what you are asking here. Do you mean formatting the query result as XML, or formatting a SOQL query as XML. What's the use case? If you need it for an external application, you could query your objects via the API and return results automatically as XML, but again, without knowing what you're after, it's hard to answer the question as written. Please add some details. – Paddyslacker Aug 05 '11 at 15:35

2 Answers2

1

Apex has a Class called XmlStreamWriter for constructing XML document. Refer the documentation at - XmlStreamWriter Class

manubkk
  • 1,468
  • 12
  • 20
0

You can use XmlStreamWriter (as suggested above) or XmlDom.cls (via Ron Hess) or TG_XmlDom.cls (Dom Library based on Spring'11 Apex Dom Classes)

Abhinav Gupta
  • 207
  • 1
  • 5