?
Solved

Parse XML

Posted on 2003-03-03
12
Medium Priority
?
191 Views
Last Modified: 2010-04-16
Hi!!

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

Tks
Bruno Chavez
0
Comment
Question by:crash_master25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 8059254
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
 

Author Comment

by:crash_master25
ID: 8059386
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
 
LVL 15

Accepted Solution

by:
VGR earned 200 total points
ID: 8059973
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
Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

 
LVL 3

Expert Comment

by:ILE
ID: 8061443

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
 
LVL 5

Expert Comment

by:Kocil
ID: 8062655
go to this site
http://xml.defined.net/sax/
0
 
LVL 15

Expert Comment

by:VGR
ID: 8062801
Warning : no check for success on ReSet()
Also Close(textfile) is deprecated, it should be CloseFile (as I wrote above :D )
0
 
LVL 3

Expert Comment

by:ILE
ID: 8062938
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
 
LVL 15

Expert Comment

by:VGR
ID: 8062951
exact, my apologies
0
 
LVL 1

Expert Comment

by:vadik
ID: 8146970
If you are working under Windows you can to use the IXMLDocument, IXMLElement, IXMLElementCollection etc...
0
 

Expert Comment

by:CleanupPing
ID: 9314372
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
 
LVL 15

Expert Comment

by:VGR
ID: 9324110
answer to me.

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question