[fpc-pascal] OOP and XML usage

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Jan 28 15:57:49 CET 2010


On 28 January 2010 16:10, Jorge Aldo G. de F. Junior <jagfj80 at gmail.com> wrote:
>
> Whenever the xml loader finds a <mytag something="test"/> it will
> create an instance of TMyClass and set the published properties
> accordingly (Using RTTI)...

I like that idea, but how flexible is? By that I mean, I have nested
tags (using the same element name) that I need to load. Something like
a dependency tree. My custom object model can handle this without
problems, but I'm still curious about your solution.

Example XML, and there isn't a limit to the nesting of options.

<install>
  <option>Option 1</option>
  <option>Base database support
    <option>Firebird drivers
      <option>Windows</option>
      <option>Linux</option>
    </option>
    <option>MySQL drivers</option>
  </option>
</install>


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list