Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Basics of XML Lab Manual

Basics of XML Lab Manual

Published by Teamlease Edtech Ltd (Amita Chitroda), 2022-08-30 10:31:41

Description: Basics of XML Lab Manual

Search

Read the Text Version

JAVA XML FULL STACK DEVELOPMENT

Objectives of this Lab Manual This lab manual includes - Exercises for hands on practice Guidelines to complete the exercise Learning Outcome

Creating an XML document and a DTD for the database

Problem What will you do? Statement Design an XML (Extensible Markup Language) document for a database of animals. The root element should be ‘animal’. There should be an intermediate ‘vertebrates’ element containing all the child elements. The child elements should be name, species, and blood. Also, design a valid DTD (Document Type Definition).

Solution What will be the steps Steps to get the output? • Step1: Open a text document and save it with .xml extension. • Step 2: Write a prolog for the XML document. Step 3: Link a DTD corresponding to the XML document. Later design the DTD.

Solution What will be the steps Steps to get the output? • Step 4: Design the XML documents with mentioned root elements and child elements. • Step 5: Open a text document and save it as ‘animal.dtd’ with a .dtd extension. Observe the XML and appropriately create a DTD for validation.

Code Code for step 2: <?xml version=\"1.0\" encoding=\"UTF-8\"?> Code for step 3: <!DOCTYPE animal SYSTEM ‘animal.dtd’>

Output Raw Output: Output for the Adedxetercxitsheewreil:l- be :- Formated Output:

Learning Outcome After Performing this Add teExxt ehrecries:e- You will be able to successfully transfer data from one system to another, carry information about your website efficiently, complement your HTML document and provide additional support, store complex data structures for the website, and understood the structure of XML and DTD, successfully created an XML and a valid DTD for the sample animal database.

Happy Learning!


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook