Does anyone have the elements for a utility that measures the 'depth' of a
field tag eg, given an XML doc sample? I'm attempting to quantify the level of
nesting exhibited by individual data fields in a msg ... eg,
<Date> ---> level 0
<Time>
<Security>
<PrimaryExchange>
<Price> ---> level 4
<Tick>
<Volume>
<Bid>
<Ask>
</PrimaryExchange>
</Security>
</Time>
</Date>
In principle, the utility should apply to tagged msgs in general, such as
ISO15022 type msgs that have recursive segments, eg
:16R:SETPRTY ---> level n
:95R::BUYR/DTCYID/050 --- level n+1
:97A::SAFE//83452
:16S:SETPRTY
:16R:AMT
:19A:::SETT//USD30170.
:16S:AMT
Thanks / ... Chito
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm