Summary

This document provides an overview of XML, including its structure, components, and uses. It details various topics like XML declaration, tags, elements, and attributes.

Full Transcript

Overview of XML Syllabus : Overview of XML Y Syllabus Topic : Overview of XMLi.es.-..sc.. 3.1 | [email protected] Explain XSD with suitable example.......... wr...

Overview of XML Syllabus : Overview of XML Y Syllabus Topic : Overview of XMLi.es.-..sc.. 3.1 | [email protected] Explain XSD with suitable example.......... wr 6 3.1 Introduction to XML.u......ccccceseesseseecssesesesees 31 LQ. 3.4.2 How simple type and complex type ; represents in XSD?..........cssessssscccserssssesers 3-6 LQ. 3.1.1 Explain the structure of XML Document........ 3-1 3.4.1 XML with CSS..........eescassesssseene i dTesacene areas’ 3-7 3.2 Components Of XML......cccccccssececsstscescssescseess 3-1 LQ. 3.4.3 What are the different ways to apply LQ. 3.2.1 Write a short note on components , : i formatting to the XML Document?.............6... 3-7 Of XML wos ecsssssesessesetsrsessessessasersssseceseesesesees 3-1 3.4.2 XML With XSLT...........csccscscssesssssesssescessecsserees 3-8 LQ. 3.2.2 Explain the structure of XML Document........ 3-1 LQ. 3.4.4 What are the different ways to apply 3.3 Document Type Declaration (DTD)............... 3-4. = ( ) formatting to the XML Document?................. 3-8 LQ. 3.3.1 What is DTD? oi cecsesetscsseccescepersererees 3-4 | ‘ 3.5 XS Elpeete tee scvecsipersererdts ponocnecnoca Seer RECO 3-9 3.3.1 Intermal DTD ues cssssssscseeserecccrssseseusesecenes 3-5 LQ. 3.5.1 Whatis XSLT....... cece sp ecoensaerassenaeeese eG 3.3.2 3.4 (te Web Services (MU-B.Sc.Comp - Sem 5) : 3-1 [ ; Overview of XML Syllabus Topic : Overview of XML | am «63.1 Introduction to XML i. Lo.a.tt E LDocument EMS - XML stands for Extensible Markup Language : It is used for data storing and transferring from one application to another. — Itis a text-based markup language generated from Standard Generalized Markup Language (SGML). — Unlike HTML tags, which focus on presentation of data, XML tags focuses on data and way to organize that data. @ The characteristics of XML — XML is extensible : In XML, you to create your own tags means self descriptive tags, or language that suits your application. - XML carries the data, does not.present it : XML enables you to store the information or data and carry data without bothering how it going to be presented. -— XML is a public standard : XML is open source language which was created by an association called the World Wide Web Consortium (W3C) * XML Usage -— To provide the content to HTML document for large web sites, XML works in the background. — XML can be used to exchange the information or data between application and organizations. — XML can be used for loading, reloading and offloading of databases. - XML can be used to store, arrange and manage the data, which will help you to manage your data according to your needs. — XML can easily include style sheets to provide any desired output. - Any application can convert its data to an XML document and transfer it to any other application where it again converts XML data to its respective form. * Simple XML Document g =- 5 ee eee - a Pee, IVR. hites RY?> eo eS e a ne ™ partes + ATL VE" eek =F —= UEl-O re ie a stud a i aes Cees ioe —— s ie r[s ” Tech-Neo Publications.......... Where Authors inspire innovation uA SACHIN SHAH Venture & Web Services (MU-B.Sc.Comp - Sem 5) 3-2 Overview of XML Components | of XML 1. XML Declaration 2. Tags and Elements 3. XML Attributes 7 4, Comment 5. Namespace Fig. 3.2.1 Components of XML are : > 1. XML Declaration XML document, ”, > 2. Tags and Elements An XML document consist of different user defined XML elements, also called XML nodes or XML tags. XML elements names are enclosed in triangular brackets “< >” as below : ‘* Syntax Rules for Tags and Elements The Container XML-element must to be closed either with start or with end elements as shown below : ——— Fy alte 7 hom ~ Thess -element must be closed in same element as shown below : — Nesting of Elements : An XML document should be properly nested that is inner element Should close before outer element. The following example shows incorrect nested document : ' Tech-Neo Publications.........-- Phere Authors inspire innovation «a SACHIN SHAH Venture wv [| Web Services (MU-B.Sc.Comp - Sem 5) 3-3 Overview of XML SS. 60s eee ———————————— The following eee shows jute nested epee nt: oe uantles e Ss : oe aes Sos ee Sepals Kane ciegaee \ SL poe eeeel gee Deshpande ‘ Salt — Root Element : Root element is the first element after XML Declaration. As XML document should be properly nested, root element must be close at the end of the document. — (Case Sensitivity : The XML elements are case-sensitive. That means the element name of the start and the end elements must to be exactly in the same case. — For example, is different from > 3. XML Attributes — An attribute provides extra information about element which is specified using a name/value pair. An XML element may have any number of attributes. For example, - * ae EisvismneRantel 4. Comment XML comment is similar to BTN comment, as follows : Bicvour comment--> = A comment must starts with ia ied ends with “-->”’. Tech-Neo Publications «sesso Where Authors inspire innovation wad SACHIN SHAH Venture & Web Services (MU-B.Sc.Comp - Sem 5) 3-4 Overview of XML @ XML Comments Rules XML Comment should be follow the following rules : ~ Comments must not specify before XML declaration. i — Comments may appear anywhere in a document. — Comments should not appear within attribute or its values. — Comments should not be nested inside other comments. > 5. Plain Text Along with elements XML document can consist of plain text i.e. normal text information. > 6. Namiespace ' A Namespace is a set of unique names. Namespace is a mechanism by which element and attribute name can be assigned to a group. The Namespace is identified by URI (Uniform Resource Identifiers). @ Namespace Declaration A Namespace is declared using reserved attributes. Such an attribute name must either be xmlns or begin with xmlns: shown as below : = Rules 1. The Namespace starts with the keyword “xmlns”. The word name is the Namespace prefix, which you need to use throughout the document refer namespace. ofS The URL is the Namespace identifier. 2 3. 3 ~ Document Type Declaration (DTD) LQ. 3.3.1. What is DTD? ECE — The XML Document Type Declaration, D generally known as DTD, is nothing but the way to describe- XML omttnent precisely. — DTDs validate vocabulary and validity of the structure of XML documents and present data against grammatical and business rules. — An XML DTD can be either specified in two ways i.e. inside the same document, or it can be kept in a separate file and then linked it main xm! file. Ff Syntax Syntax of a DTD can be define as follows :

Use Quizgecko on...
Browser
Browser