CS311 Assignment 1 Solution and Discussion


  • Cyberian's Gold

    Assignment No. 1
    Semester: FALL 2019
    Introduction to Web Services Development – CS311
    Total Marks: 20

    Due Date: 15/11/2019
    Lectures Covered: 1 to 9

    Objectives:
    Understand and get hands on experience of
    • Creating well-formed XML code
    • Using XML elements
    • Using XML attributes
    • Validate XML code or Create DTD code of XML
    Instructions:
    Please read the following instructions carefully before submitting assignment:
    It should be clear that your assignment will not get any credit if:

     The assignment is submitted after due date.
     The assignment is submitted via email.
     The assignment is copied from Internet or from any other student.
     The submitted assignment does not open or file is corrupt.
     It is in some format other than MS Word File

    Note: All types of plagiarism are strictly prohibited.

    For any query about the assignment, contact at

    Q. Create an internal DTD and XML Document for the XML tree drawn below.
    DTD (10 marks)
    XML Document (10 marks)

    5dbd967d-174e-4af4-af41-e689f47a368b-image.png

    Assignment Uploading Instructions:

    You need to write DTD code of given XML tree. After testing that DTD code is working fine, Copy/Paste it into MS Word file and upload from your LMS account.

    Please note that due date of assignment will not extend, so do not wait for last date and submit your solution as quickly as possible.
    Due Date: 15/11/2019

    BEST OF LUCK


  • Cyberian's Gold

    @zareen said in CS311 Assignment 1 Solution and Discussion:

    Q. Create an internal DTD and XML Document for the XML tree drawn below.
    DTD (10 marks)
    XML Document (10 marks)

    Solution
    DTD:

    <?xml version="1.0" encoding="UTF-8"?> 
    <!DOCTYPE league [ 
    <!ELEMENT league (franchise)> 
    <!ATTLIST league name CDATA #REQUIRED> 
    <!ATTLIST league year CDATA #REQUIRED> 
    <!ELEMENT franchise (team+)>
    <!ATTLIST franchise name CDATA #REQUIRED> 
    <!ATTLIST franchise owner CDATA #REQUIRED> 
    <!ATTLIST franchise city CDATA #REQUIRED>
    <!ELEMENT team (win,losses,coach,player+)>
    <!ELEMENT win (#PCDATA)> 
    <!ELEMENT losses (#PCDATA)> 
    <!ELEMENT coach (#PCDATA)> 
    <!ELEMENT player (name,age,runs,matches)>
    <!ELEMENT name (#PCDATA)> 
    <!ELEMENT age (#PCDATA)> 
    <!ELEMENT matches (#PCDATA)>
    <!ELEMENT runs (#PCDATA)> 
    ]> 
    
    

    XML:

    <?xml version="1.0" encoding="UTF-8"?>
    <league year="" name="">
    	<franchise owner="" name="" city="">
    		<team>
    			<wins></wins>
    			<losses></losses>
    			<coach></coach>
    			<player>
    				<name></name>
    				<age></age>
    				<matches></matches>
    				<runs></runs>
    			</player>
    		</team>
    	</franchise>
    </league>
    

  • Cyberian's Gold

    @zareen said in CS311 Assignment 1 Solution and Discussion:

    Q. Create an internal DTD and XML Document for the XML tree drawn below.
    DTD (10 marks)
    XML Document (10 marks)



    Recent Topics


|