Recent

Author Topic: Units needed?  (Read 4190 times)

kormoran

  • New Member
  • *
  • Posts: 31
Units needed?
« on: March 26, 2011, 03:23:32 pm »
I'm beginning to learn lazarus, yet had played some time with Delphi years ago...

First: I'm trying to read an XML file with DOM and LCL, but I don't know which units I need to put in the uses section. Can anyone help me with that?

Second and more important: is there a (easy and) standard way to discover, generally speaking, which unit a function/type/object/component belongs to?

Thanks  :'(

circular

  • Hero Member
  • *****
  • Posts: 4402
    • Personal webpage
Re: Units needed?
« Reply #1 on: March 26, 2011, 03:27:41 pm »
For the second question, use Ctrl-Click on any identifier to know where it comes from.

This way you can also know if there is an ancestor method that has the same name.
Conscience is the debugger of the mind

herux

  • Full Member
  • ***
  • Posts: 102
Re: Units needed?
« Reply #2 on: March 26, 2011, 03:46:40 pm »
You can read this http://wiki.lazarus.freepascal.org/XML_Tutorial
for the first question

kormoran

  • New Member
  • *
  • Posts: 31
Re: Units needed?
« Reply #3 on: March 26, 2011, 03:55:40 pm »
The XML_Tutorial was exactly where I started from... sadly, it does NOT state which units are needed.

I partially solved the problem with circular's suggestion: TDOMNode and TXMLDocument come from DOM unit, but no clue is given for ReadXMLFile... maybe because it's a function and not a type?

(edit) found... it's in XMLRead unit, found poking around in fpc directories

T-bear

  • Full Member
  • ***
  • Posts: 160
Re: Units needed?
« Reply #4 on: March 26, 2011, 07:12:06 pm »
i think its XMLRead, XMLWrite abd DOM, that you will need.
Quote
Currently there is a set of units that provides support for XML on Free Pascal. These units are called "XMLRead", "XMLWrite" and "DOM" and they are part of the Free Component Library (FCL) from the Free Pascal Compiler. The FCL is already on the default search path for the compiler on Lazarus, so you only need to add the units to your uses clause in order to get XML support. The FCL is not documented currently (October / 2005), so this short tutorial aims at introducing XML access using those units.


« Last Edit: March 26, 2011, 07:20:50 pm by T-bear »

 

TinyPortal © 2005-2018