Re: AJAX without XML



"Thomas 'PointedEars' Lahn" <PointedEars@xxxxxx> wrote in message
news:16193602.pLa2S67eGz@xxxxxxxxxxxxxxxxx
> dave.c.johnson@xxxxxxxxx wrote:
>
>> Using JavaScript as the data transport encoding [...]
>
> I beg your pardon? The transport/transfer _encoding_ never was
> JavaScript,
> but was and is US-ASCII, ISO-8859-XX or UTF-16, for example. Perhaps you
> meant "data _format_" which is a completely different thing.
>
>> But if you are returning an array of data that needs to get into the
>> web page DOM (and will maybe need sorting / filtering on the client)
>> then use XML since XSL can be much easier to use for some people and it
>> can be re-used on both the client and server.
>
> What are you talking about? An array is a data structure. If that is
> returned, JSON is definitely the best format as the language it is built
> on has built-in array support. Perhaps you meant returning a DOM subtree
> with several child elements where XML would be more appropriate.

In some cases, it can be preferable to just return a string with
semicolon separated values, and .split() it on arrival. If nothing
else, it is compact, and does not depend on any libraries being present.

--
Dag.


.



Relevant Pages

  • Re: xml
    ... XML has no good array structure representation. ... of pointers into the DOM and as you iterate over the DOM, you fill the array in with these ... There are so many XML reader packages out there that there is no one way to do this. ...
    (microsoft.public.vc.mfc)
  • Simplified DOM idiom for building XML - revisited
    ... overcomplicated scheme for improving how we create content using the DOM API. ... you can solve all these problems with an appropriate wrapper class ... with some very trivial parsing to allow the use of compact node definition ... array as the set of children for the preceeding node in the array. ...
    (comp.text.xml)
  • Re: Sending data in a DOM table to the server (with a POST)
    ... I am using Struts now but not using XML. ... have just been able to return an array to a .jsp program. ... The person adds and deletes records from the DOM ...
    (comp.lang.java.help)
  • Re: return a paired lists or arraylist from a webservice
    ... The problem appears to be in serlizing the ... You can see a returned ArrayList on a client application as an object ... This means there isn't really a problem with the XML - it just ... comes through as an array of object. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: return a paired lists or arraylist from a webservice
    ... The problem appears to be in serlizing the ... You can see a returned ArrayList on a client application as an object ... This means there isn't really a problem with the XML - it just ... comes through as an array of object. ...
    (microsoft.public.dotnet.framework.webservices)