Guys,

Just doing some work with the XMLApiHelper and im finding some things
that can be improved. For instance, the trait provides createTag which
you then have to override like so:

def createTag(in: NodeSeq) = <api>{in}</api>

IMO, it seems that this isnt ideal as if you were returning a list of
users, your xml would be:

<api>
  <user>....</user>
  <user>....</user>
</api>

It would be better to have a configurable root node, so its a more
logical semantic:

<users>
  <user>....</user>
  <user>....</user>
</users>

I've been playing around with the best way to do it and by changing
the implicits and the xml build methods I now have it so that you can
do:

def listAllUsers = {
  ...
  ("users", listOfUsers)
}

This appears to be the best way to do it, otherwise things start
getting messy?

Whilst I can make these changes code wise, im very aware that ESME
uses this helper a lot and this would mean some significant breaking
changes in the api construction, both for ESME, and no doubt other
projects. IMHO, the change is worth the hassle as it will make
services up of more logically formed xml.

What are people's thoughts?

Cheers

Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to