0% found this document useful (0 votes)
27 views2 pages

301P Solution File

The document describes an XML code structure for representing a software house company. It outlines the root element, child elements for company name, location, departments, employees, projects, and required element attributes.

Uploaded by

ridekek326
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

301P Solution File

The document describes an XML code structure for representing a software house company. It outlines the root element, child elements for company name, location, departments, employees, projects, and required element attributes.

Uploaded by

ridekek326
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Problem Statement:

Marks 20

You are required to write XML code for the following description of a software house.

 <company>: This is the root element representing the software house company.
o <name>: Specifies the name of the company.
o <location>: Contains information about the company's location.
 <city>: Specifies the city where the company is located.
 <country>: Specifies the country where the company is located.
o <departments>: Contains a list of departments within the company.
 <department>: Represents a single department within the company.
 <name>: Specifies the name of the department.
 <employees>: Contains a list of employees within the
department.
 <employee>: Represents a single employee within the
department.
 <name>: Specifies the name of the employee.
 <position>: Specifies the position or role of the
employee.
o <projects>: Contains a list of projects being undertaken by the company.
 <project>: Represents a single project.
 <name>: Specifies the name of the project.
 <department>: Specifies the department responsible for the
project.
 <status>: Specifies the current status of the project (e.g., "In
Progress", "Completed").

Note: You can take any data to write in xml code as text i.e

<location>
<city>
Faisalabad
</city>
</location>
Answer:
<?xml version="1.0" encoding="UTF-8"?>
<company>
<name>Faizan software house</name> <location>
<city>Faisalabad</city> <country>Pakistan</country> </location>
<departments>
<department>
<name>Development</name>
<employees>
<employee>
<name>Ali Yousaf</name>
<position>Software Developer</position>
</employee>
</employees>
</department>
<department>
<name>Marketing</name>
<employees>
<employee>
<name>Rehan Ali</name>
<position>Marketing Manager</position>
</employee>
</employees>
</department>
</departments>
<projects>
<project>
<name>Project No 03</name>
<department> WEB Development</department>
<status>In Progress</status>
</project>
</projects>
</company>

You might also like