Find Jobs
Hire Freelancers

Delphi: Unit wrapper for basic XML read/write

$30-5000 USD

Completed
Posted about 14 years ago

$30-5000 USD

Paid on delivery
Dear Coders, I need a unit for Delphi 7 to create a XML file from the scratch and write values to it and read them at a later time. When the empty XML file is created, we want to define all sections/subsections that are going to appear in the XML file and write values to them. Suppose that we want to generate the following XML file: **<DOCUMENT> ? <SectionA> ? ? ? ? ? ? <SectionA1> ? ? ? ? ? ? ? ? ? <keyA1>Hello<\keyA1> ? ? ? ? ? ? </SectionA1> ? ? </SectionA>? ? ? ? ? ? ? ? <SectionB> ? ? ? ? ? ? ? ? <SectionB1> ? ? ? ? ? ? ? ? ? <keyB1>Hello<\keyB1> ? ? ? ? ? ? </SectionB1> ? ? </SectionB>? ? ? ? ? </DOCUMENT>** We need a funtion to first define all the sections and subsections that our XML file will have. A possible solution would be the implementation of the following function: CreateXMLSection(parentSectionName, SectionName); For the above example it would be: CreateXMLSection(nil, 'DOCUMENT');? ? // nil for the main section CreateXMLSection('DOCUMENT', 'SectionA'); CreateXMLSection('DOCUMENT', 'SectionB'); CreateXMLSection('SectionA', 'SectionA1'); CreateXMLSection('SectionB', 'SectionB1'); Notice that we will NOT use same sub-sections names, so, the parent section can be found without ambiguity. After we have defined the section names, we just insert data into it. Example (as shown above): WriteString('SectionA1', 'keyA1', 'Hello World'); WriteString('SectionB1', 'keyB1', 'Hello World'); Functions that we need ------------------------------ CreateXML(pFileName)? // create an empty XML file SaveXML();? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? // save our XML to file LoadXML(pFileName)? ? ? // load our previous saved XML file CreateXMLSection(parentSectionName, SectionName); WriteString(Section, Key, Value) ReadString(Section, Key) WriteBoolean(....) ReadBoolean(....) WriteInteger(....) ReadInteger(....) The solution must be written in Delphi 7. Thanks, A. ## Deliverables Delphi 7, Windows
Project ID: 3328473

About the project

4 proposals
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$42.50 USD in 4 days
5.0 (12 reviews)
5.7
5.7
4 freelancers are bidding on average $91 USD for this job
User Avatar
See private message.
$255 USD in 4 days
4.5 (13 reviews)
4.5
4.5
User Avatar
See private message.
$42.50 USD in 4 days
5.0 (8 reviews)
3.9
3.9
User Avatar
See private message.
$25.50 USD in 4 days
4.9 (4 reviews)
1.4
1.4

About the client

Flag of SPAIN
Jerez de la Frontera, Spain
5.0
72
Member since Sep 22, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.