Is XPATH the way to search a data model?

Guy Rixon gtr at ast.cam.ac.uk
Tue May 18 04:11:10 PDT 2004


On Tue, 18 May 2004, Martin @ ROE wrote:

> David Berry wrote:
>
> > But once the XML has be de-serialised into an in-memory structure why not
> > use class methods which have intimate knowledge of the semantic meaning
> > of the class properties and can therefore do more intelligent decisions?
>
> I think both ways (XPath & class method calls) are really the same if
> you mean using 'getXxxxx' class methods.  Both are just ways of
> navigating through the data model.

Yeah but... with XPath you can find structures and deconstruct them in one go.
Asking, say, an IsophotalDiameter for its Passband is easy in both systems.
_Finding_ an IsophotalDiameter using just getXxxxx() on its containers is a
lot of tedious programming.


Guy Rixon 				        gtr at ast.cam.ac.uk
Institute of Astronomy   	                Tel: +44-1223-337542
Madingley Road, Cambridge, UK, CB3 0HA		Fax: +44-1223-337523



More information about the dm mailing list