Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

Parse XML

Hi!!

Do you know one form to parse XML file, for example to read a configuration file, etc???

Tks
Bruno Chavez
0
crash_master25
Asked:
crash_master25
1 Solution
 
mlmccCommented:
Are you trying to do this in Pascal?

If not I would ask the question in the appropriate forum and ask Community Support to delete this question.

mlmcc
0
 
crash_master25Author Commented:
ok, sorry, but Yes, I want to open a XML in Pascal and parse it...

I think it is in the correct forum...

Or Not??

What I need to do is parse an xml in pascal to read a config file written in xml and use this to work with the appz. All in pascal

Tks
0
 
VGRCommented:
well, this is just a textfile after all :D
If you know what to do qith the XML contents, then the answer is "yes, it's easy" : AssignFile(), {$I-}, ReSet(), {$I+}, IOResult, ReadLn(), CloseFile()

pretty standard text file reading
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ILECommented:

how to open edn read xml file in tP 6.0


var
fil: text;
s:string;


begin

assign(fil,'c:\animals.xml');
reset(fil);
while not eof(fil) do
begin
  readln(fil,s);
  writeln(s);  {or whatever you wont}
end;

close(fil);
end.



if use delphi
instead of assign use assignfile
instead of close use close file
and instaed of

fil:text use fil: textfile;


:) easy

0
 
KocilCommented:
go to this site
http://xml.defined.net/sax/
0
 
VGRCommented:
Warning : no check for success on ReSet()
Also Close(textfile) is deprecated, it should be CloseFile (as I wrote above :D )
0
 
ILECommented:
in tp 6.0 there is no such command closefile

just close;

:)))

and like i wrote  down in the teht there a difrent set of comands if u use later version of pascal including delphi

0
 
VGRCommented:
exact, my apologies
0
 
vadikCommented:
If you are working under Windows you can to use the IXMLDocument, IXMLElement, IXMLElementCollection etc...
0
 
CleanupPingCommented:
crash_master25:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
VGRCommented:
answer to me.

this answered the question : AssignFile(), {$I-}, ReSet(), {$I+}, IOResult, ReadLn(), CloseFile()
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now