XML : How to return a xml with attributes

I am implementing a web API. When I received a request I want to send an response which should be look like this.

  <a sid="1000">     <b key="version" value="1.5.0"/>  </a>    

How can i generate a response like this?

No comments:

Post a Comment