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

CS311 - Assignment

The document contains an example XML code representing the structure of a software house company. The XML code defines a root company element and includes child elements describing the company name, location, departments, employees, projects, and their attributes.

Uploaded by

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

CS311 - Assignment

The document contains an example XML code representing the structure of a software house company. The XML code defines a root company element and includes child elements describing the company name, location, departments, employees, projects, and their attributes.

Uploaded by

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

Assignment 1

C311

Name: M. Ahmad
Id: Bc170406373

Q1:
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").

Ans:

<company>
<name>InnovaCode Solutions</name>
<location>
<city>Karachi</city>
<country>Pakistan</country>
</location>
<departments>
<department>
<name>Development</name>
<employees>
<employee>
<name>John Doe</name>
<position>Software Engineer</position>
</employee>
<employee>
<name>Jane Smith</name>
<position>UI/UX Designer</position>
</employee>
</employees>
</department>
<department>
<name>Testing</name>
<employees>
<employee>
<name>Alice Johnson</name>
<position>QA Analyst</position>
</employee>
<employee>
<name>Bob Williams</name>
<position>Automation Tester</position>
</employee>
</employees>
</department>
</departments>
<projects>
<project>
<name>Project Alpha</name>
<department>Development</department>
<status>In Progress</status>
</project>
<project>
<name>Project Beta</name>
<department>Testing</department>
<status>Completed</status>
</project>
</projects>
</company>

You might also like