furiabhavesh
furiabhavesh

Reputation: 415

What data format is this?

I was checking one share trading site's AJAX response and below is what it showed up in Firebug Response tab of XHR section. Can anyone explain me what format is this and how is it parsed ?

<ST=tat>
<SI=0>
<TB=txtSearch>
  <560v=Tata Motors Ltdv=TATMOT>
  <566v=Tata Steel Ltdv=TATSTE>
  <3199v=Ashram Online.com Ltdv=ASHONL>
  <4866v=Kreon Finnancial Services Ltdv=KREFIN>
  <552v=Tata Chemicals Ltdv=TATCHE>
  <554v=Tata Power Company Ltdv=TATPOW>
  <2986v=Tata Metaliks Ltdv=TATMET>
  <300v=Tata Sponge Iron Ltdv=TATSPO>
  <121v=Tata Coffee Ltdv=TATCOF>
  <2295v=Tata Communications Ltdv=TATCOM>
  <0v=Time In Milli-Secondsv=0>

Upvotes: 2

Views: 112

Answers (2)

Williham Totland
Williham Totland

Reputation: 29029

I think what we are dealing with here is some proprietary format, likely an Eldricht SGML Horror of some sort.

Banking in general has all sorts of Eldricht horrors running about.

On a related note, this is very much not XML.

Edit:

A quick analysis* indicates that this is a format consisting of a series of statements bracketed by <>; with the parts of the statements separated by = or v=. = seems to indicate a parameter to a control statement, indicated by a two-letter code. (<ST=tat>), while v= seems to indicate an assignment or coupling of some kind (short for "value"?), or perhaps just a field separator.

<ST appears to be short for "search term"; <TB appears to be short for "(source) table". The meaning of <SI eludes me. It is possible that <TB terminates the metadata section, but it's equally possible that the metadata section has a fixed number of terms.

As nothing refers to the number of fields in each statement in the data section, and they are all of the same length (3 fields), it is likely that the number of fields is fixed, but it might derive from the value of <TB, or even <SI, in some way.

What is abundantly clear, however, is that this data is not intended for consumption by other applications than the one that supplies it.

*Caveat: Without a much larger sample it's impossible to tell if this analysis is valid.

Upvotes: 4

Quentin
Quentin

Reputation: 944011

It is not a commonly used "web format".

It is probably a proprietary format used by that site and will be parsed by their custom JavaScript.

Upvotes: 1

Related Questions