简体   繁体   中英

Reading XML data into lazarus

I need to read XML data into lazarus, in order to present this data as gui elements. for example:

<?xml version="1.0" encoding="utf-8"?>
<guiform>
  <category name="aaa">
    <item a="abc" b="12" c="1e-10" d="blah blah blah" />
    <item a="asa" b="13" c="0" d="" />
    <item a="juy" b="43" c="0" d="dh dh dh" />
  </category>
  <category name="bbb">
    <item a="hgf" b="87" c="1.5" d="a b d c" />
    <item a="rtg" b="42" c="0" d="ty th hgf" />
  </category>
</guiform>

Every category will become a tab on a form, and the items will become radio buttons. What is the best way of doing this? RTTI? Or maybe read & parse the file? And how to populate the GUI elements? (example would be great as I am a beginner..)

TXMLPropStorage已经为您做到了。

使用fcl-xml读取XML,然后编写代码以实例化相关组件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM