The document provides an introduction to XML (Extensible Markup Language), explaining its characteristics, structure, and syntax, differentiating it from HTML. It covers key concepts such as XML elements, tags, DTD (Document Type Definition), and XML Schema, emphasizing the flexibility and capabilities of XML in data representation. Additionally, it highlights the importance of DOM (Document Object Model) for accessing and manipulating XML documents programmatically.
XML is a markup language that defines rules for encoding documents to be both human- and machine-readable. It allows users to define customized tagging structures for different types of documents. A DTD defines the structure and legal elements and attributes of an XML document, ensuring documents conform to the specified rules. XML documents can reference internal or external DTDs to validate document structure. Elements, attributes, and other syntax rules like closing tags help ensure XML documents are properly structured and readable.
XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. XML documents are formed as element trees that contain nested elements and attributes. XML documents can be validated against XML schemas or DTDs to ensure they follow the defined structure and syntax. Namespaces are used in XML to avoid conflicts between elements with the same name from different sources.
The document provides an overview of XML (Extensible Markup Language). It describes XML as a text-based markup language derived from SGML that uses tags to identify and organize data rather than display it like HTML. The document outlines key characteristics of XML including that it is extensible, carries data without presenting it, and is an open standard. It also provides examples of XML usage and describes the basic syntax and components of XML documents and elements.
XML is a markup language that is used to define and store data in a structured format. It allows data to be separated from its presentation and is extensible to add new tags. An XML document must have a root element and follow syntax rules to be well-formed. It can also be validated against a DTD or schema to check that the elements and structure match the definitions.
XML is a markup language designed to transport and store data. It was created to be self-descriptive and allows users to define their own elements. XML separates data from presentation and is used to create new internet languages, simplify data storage and sharing, and transport and make data more available across different platforms. XML documents form a tree structure with elements nested within other elements.
The document provides an extensive overview of XML, detailing its syntax, structure, and application in web technologies. It covers the advantages of XML, the use of Document Type Definitions (DTD), XML namespaces, and XML schemas, highlighting how these elements integrate and function together. Additionally, the document discusses how to style XML documents using CSS and the mechanics of processing XML through two main approaches: SAX and DOM.
XML - Extensible Markup Language for Network Security.pptxkalanamax
The document provides an overview of XML (Extensible Markup Language), outlining its purpose in data transport and storage, and distinguishing it from HTML. It details the syntax rules, structure, and components of XML, including elements, attributes, and naming conventions. The guide also discusses practical uses of XML in web development and highlights best practices for creating well-formed XML documents.
This document provides an introduction to XML, including:
- What XML is and why it was created as an extensible meta language for describing other languages.
- Basic XML rules like tags being case sensitive, elements needing closing tags, and attributes requiring quotation marks.
- Differences between XML and HTML in terms of focus, predefined tags, and use for transporting vs displaying data.
- Benefits of XML like improved web functionality through custom markup and being a meta language that describes other languages.
The document provides an overview of XML basics including XML concepts, technologies for describing XML like DTD and XML Schema, and how to parse XML in Java using SAX, DOM, and JAXP. It introduces XML, elements, attributes, namespaces, validation with DTD and XML Schema. It describes parsing XML with SAX, which is event-driven and does not store the parsed data, and DOM, which parses the entire XML into an in-memory tree structure that allows random access.
- XML (eXtensible Markup Language) is a markup language that is designed to store and transport data. It was released in the late 1990s and became a W3C recommendation in 1998.
- XML is not meant to display data like HTML, but rather to carry data. It is designed to be self-descriptive, platform independent, and language independent. Tags are defined by the user rather than being predefined.
- A markup language uses tags to highlight or underline parts of a document. Modern markup languages like XML use tags to replace highlighting and underlining.
XML is a markup language that defines rules for encoding documents in a human- and machine-readable format. It allows users to define their own elements and tags to structure data. Some key benefits of XML include its extensibility, ability to carry data independently of presentation, and status as a public standard. While XML provides structure and organization, it does not perform computations or specify how data should be displayed.
XML stands for Extensible Markup Language. It is used to transport and store data in a structured format. XML allows users to define their own elements and tags, making it flexible. Some key points about XML include:
- XML is designed to carry data, not display it like HTML.
- XML documents have a tree structure with a root element and branching child elements.
- XML elements must have a closing tag and follow other syntax rules like being case sensitive.
- XML can transport data between incompatible systems and is hardware and software independent.
XML stands for Extensible Markup Language. It is used to transport and store data in a structured format that is both human-readable and machine-readable. XML documents contain elements that can have child elements, attributes, and text. XML has simple syntax rules including requiring closing tags, case-sensitivity, proper nesting, and quoting of attribute values. XML is widely used for data exchange across different systems.
XML (eXtensible Markup Language) is a markup language that is designed to store and transport data. It allows data to be shared across different systems, software, and hardware. XML documents contain elements that can have child elements, attributes, and text. XML has simple, strict syntax rules for tags, nesting, and formatting. Elements can be extended without breaking existing applications. This makes XML very flexible and extensible for sharing structured data.
Web Development Course - XML by RSOLUTIONSRSolutions
The document provides an overview of XML including:
1. XML was developed by the W3C to overcome HTML limitations and transport data rather than display it. XML is readable, understandable, well-defined, and self-descriptive.
2. An XML document has a tree structure with a root element containing child elements, attributes, and data. Elements are used to classify data and can contain other elements, text, and attributes.
3. XML documents must follow syntax rules like having matching opening and closing tags and properly nested elements. Attributes require values to be in quotes.
XML is a markup language similar to HTML but designed for carrying data rather than displaying it. It allows users to define their own elements and tags. XML documents use tags to describe and structure information and can be displayed using CSS or transformed using XSL. Key benefits of XML include its ability to describe hierarchical data, separate data from presentation, and enable data sharing across different systems.
This document provides an introduction to XML including its key characteristics and uses. XML allows for custom tags to store and transport data independently of how it is presented. It is an open standard developed by W3C. XML is commonly used to exchange information between organizations and systems, store and arrange customized data, and combine with style sheets to output desired formats. XML documents require a root element, closed tags, proper nesting, and quoted attribute values. The XML declaration specifies settings for parsing.
Web Security Extensible Markup Language.pptxSidduSKamatar
XML (Extensible Markup Language) is a markup language designed to store and transport data in a format that is both human-readable and machine-readable. It defines syntax rules for elements, attributes, and document structure, and can use Document Type Definitions (DTD) or XML Schema Definitions (XSD) for validation. Web security concepts, along with various vulnerabilities and authentication methods, are also discussed in relation to protecting data and applications.
This document provides an introduction to XML, including its structure, syntax, and uses. It defines XML as a markup language that provides a format for structured data. It describes XML elements, attributes, and how XML documents must follow specific syntax rules to be considered well-formed. The document also discusses Document Type Definitions (DTDs), XML namespaces, XML schemas, displaying XML with CSS, and transforming XML with XSLT.
XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It was designed to carry data, not display it like HTML. XML is important because it separates data from presentation, allows data to be shared across different systems, and makes data easier to store and process. The basic building blocks of XML include elements, attributes, entities, processing instructions, comments, and tags.
SGML is a standard for specifying markup languages. It describes how to define document structure separately from presentation. XML is a simplified version of SGML used to store and transport data. Key differences between XML and HTML include XML focusing on data rather than presentation, being case sensitive, requiring closing tags, and preserving whitespace.
XML is a markup language that allows users to define their own tags. It was created to describe data rather than display it like HTML. XML uses tags to provide context and meaning to data. Documents must follow specific rules to be considered well-formed, such as having matching start and end tags. Documents can also specify a document type definition (DTD) or schema to add additional structure and validation.
XML (eXtensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It is used to store and transport data. The document discusses XML, comparing it to HTML and SGML. It also covers XML parsers, schemas, namespaces, XSLT, and other XML concepts in detail.
XML is a markup language that represents text information in a standard format. It was designed to transport and store information in a reliable way. XML has a wide range of applications and is just a formalism unlike HTML. XML documents can be validated against a DTD to check that they conform to the defined syntax rules and are well-formed.
The document defines XML as a markup language for structured data similar to HTML but designed to carry data rather than display it. XML uses user-defined tags rather than predefined tags. It was introduced in 1998 by the W3C and is used widely on the web to transport and share data between applications. XML separates data from formatting and simplifies data sharing, transport, and platform changes by making data more available.
XML - Extensible Markup Language for Network Security.pptxkalanamax
The document provides an overview of XML (Extensible Markup Language), outlining its purpose in data transport and storage, and distinguishing it from HTML. It details the syntax rules, structure, and components of XML, including elements, attributes, and naming conventions. The guide also discusses practical uses of XML in web development and highlights best practices for creating well-formed XML documents.
This document provides an introduction to XML, including:
- What XML is and why it was created as an extensible meta language for describing other languages.
- Basic XML rules like tags being case sensitive, elements needing closing tags, and attributes requiring quotation marks.
- Differences between XML and HTML in terms of focus, predefined tags, and use for transporting vs displaying data.
- Benefits of XML like improved web functionality through custom markup and being a meta language that describes other languages.
The document provides an overview of XML basics including XML concepts, technologies for describing XML like DTD and XML Schema, and how to parse XML in Java using SAX, DOM, and JAXP. It introduces XML, elements, attributes, namespaces, validation with DTD and XML Schema. It describes parsing XML with SAX, which is event-driven and does not store the parsed data, and DOM, which parses the entire XML into an in-memory tree structure that allows random access.
- XML (eXtensible Markup Language) is a markup language that is designed to store and transport data. It was released in the late 1990s and became a W3C recommendation in 1998.
- XML is not meant to display data like HTML, but rather to carry data. It is designed to be self-descriptive, platform independent, and language independent. Tags are defined by the user rather than being predefined.
- A markup language uses tags to highlight or underline parts of a document. Modern markup languages like XML use tags to replace highlighting and underlining.
XML is a markup language that defines rules for encoding documents in a human- and machine-readable format. It allows users to define their own elements and tags to structure data. Some key benefits of XML include its extensibility, ability to carry data independently of presentation, and status as a public standard. While XML provides structure and organization, it does not perform computations or specify how data should be displayed.
XML stands for Extensible Markup Language. It is used to transport and store data in a structured format. XML allows users to define their own elements and tags, making it flexible. Some key points about XML include:
- XML is designed to carry data, not display it like HTML.
- XML documents have a tree structure with a root element and branching child elements.
- XML elements must have a closing tag and follow other syntax rules like being case sensitive.
- XML can transport data between incompatible systems and is hardware and software independent.
XML stands for Extensible Markup Language. It is used to transport and store data in a structured format that is both human-readable and machine-readable. XML documents contain elements that can have child elements, attributes, and text. XML has simple syntax rules including requiring closing tags, case-sensitivity, proper nesting, and quoting of attribute values. XML is widely used for data exchange across different systems.
XML (eXtensible Markup Language) is a markup language that is designed to store and transport data. It allows data to be shared across different systems, software, and hardware. XML documents contain elements that can have child elements, attributes, and text. XML has simple, strict syntax rules for tags, nesting, and formatting. Elements can be extended without breaking existing applications. This makes XML very flexible and extensible for sharing structured data.
Web Development Course - XML by RSOLUTIONSRSolutions
The document provides an overview of XML including:
1. XML was developed by the W3C to overcome HTML limitations and transport data rather than display it. XML is readable, understandable, well-defined, and self-descriptive.
2. An XML document has a tree structure with a root element containing child elements, attributes, and data. Elements are used to classify data and can contain other elements, text, and attributes.
3. XML documents must follow syntax rules like having matching opening and closing tags and properly nested elements. Attributes require values to be in quotes.
XML is a markup language similar to HTML but designed for carrying data rather than displaying it. It allows users to define their own elements and tags. XML documents use tags to describe and structure information and can be displayed using CSS or transformed using XSL. Key benefits of XML include its ability to describe hierarchical data, separate data from presentation, and enable data sharing across different systems.
This document provides an introduction to XML including its key characteristics and uses. XML allows for custom tags to store and transport data independently of how it is presented. It is an open standard developed by W3C. XML is commonly used to exchange information between organizations and systems, store and arrange customized data, and combine with style sheets to output desired formats. XML documents require a root element, closed tags, proper nesting, and quoted attribute values. The XML declaration specifies settings for parsing.
Web Security Extensible Markup Language.pptxSidduSKamatar
XML (Extensible Markup Language) is a markup language designed to store and transport data in a format that is both human-readable and machine-readable. It defines syntax rules for elements, attributes, and document structure, and can use Document Type Definitions (DTD) or XML Schema Definitions (XSD) for validation. Web security concepts, along with various vulnerabilities and authentication methods, are also discussed in relation to protecting data and applications.
This document provides an introduction to XML, including its structure, syntax, and uses. It defines XML as a markup language that provides a format for structured data. It describes XML elements, attributes, and how XML documents must follow specific syntax rules to be considered well-formed. The document also discusses Document Type Definitions (DTDs), XML namespaces, XML schemas, displaying XML with CSS, and transforming XML with XSLT.
XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It was designed to carry data, not display it like HTML. XML is important because it separates data from presentation, allows data to be shared across different systems, and makes data easier to store and process. The basic building blocks of XML include elements, attributes, entities, processing instructions, comments, and tags.
SGML is a standard for specifying markup languages. It describes how to define document structure separately from presentation. XML is a simplified version of SGML used to store and transport data. Key differences between XML and HTML include XML focusing on data rather than presentation, being case sensitive, requiring closing tags, and preserving whitespace.
XML is a markup language that allows users to define their own tags. It was created to describe data rather than display it like HTML. XML uses tags to provide context and meaning to data. Documents must follow specific rules to be considered well-formed, such as having matching start and end tags. Documents can also specify a document type definition (DTD) or schema to add additional structure and validation.
XML (eXtensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It is used to store and transport data. The document discusses XML, comparing it to HTML and SGML. It also covers XML parsers, schemas, namespaces, XSLT, and other XML concepts in detail.
XML is a markup language that represents text information in a standard format. It was designed to transport and store information in a reliable way. XML has a wide range of applications and is just a formalism unlike HTML. XML documents can be validated against a DTD to check that they conform to the defined syntax rules and are well-formed.
The document defines XML as a markup language for structured data similar to HTML but designed to carry data rather than display it. XML uses user-defined tags rather than predefined tags. It was introduced in 1998 by the W3C and is used widely on the web to transport and share data between applications. XML separates data from formatting and simplifies data sharing, transport, and platform changes by making data more available.
Understanding Amplitude Modulation : A GuideCircuitDigest
Discover how amplitude modulation works through a detailed guide covering its principles, waveform behavior, and hands-on AM circuit demo using simple electronic components. Great for students and RF beginners.
Read more : https://circuitdigest.com/electronic-circuits/what-is-amplitude-modulation-complete-guide-formula-circuit-diagram-practical-demonstration
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...resming1
Lecture delivered in 2021. This gives an introduction to Natural Language Processing. It describes the use cases of NLP in daily life. It discusses the stages in NLP Pipeline. It highlights the challenges involved covering the different levels of ambiguity that could arise. It also gives a brief note on the present scenario with the latest language models, tools and frameworks/libraries for NLP.
Low Power SI Class E Power Amplifier and Rf Switch for Health Careieijjournal
This research was to design a 2.4 GHz class E Power Amplifier (PA) for health care, with 0.18um Semiconductor Manufacturing International Corporation CMOS technology by using Cadence software. And also RF switch was designed at cadence software with power Jazz 180nm SOI process. The ultimate goal for such application is to reach high performance and low cost, and between high performance and low power consumption design. This paper introduces the design of a 2.4GHz class E power amplifier and RF switch design. PA consists of cascade stage with negative capacitance. This power amplifier can transmit 16dBm output power to a 50Ω load. The performance of the power amplifier and switch meet the specification requirements of the desired.
Impurities of Water and their Significance.pptxdhanashree78
Impart Taste, Odour, Colour, and Turbidity to water.
Presence of organic matter or industrial wastes or microorganisms (algae) imparts taste and odour to water.
Presence of suspended and colloidal matter imparts turbidity to water.
This covers traditional machine learning algorithms for classification. It includes Support vector machines, decision trees, Naive Bayes classifier , neural networks, etc.
It also discusses about model evaluation and selection. It discusses ID3 and C4.5 algorithms. It also describes k-nearest neighbor classifer.
本資料「To CoT or not to CoT?」では、大規模言語モデルにおけるChain of Thought(CoT)プロンプトの効果について詳しく解説しています。
CoTはあらゆるタスクに効く万能な手法ではなく、特に数学的・論理的・アルゴリズム的な推論を伴う課題で高い効果を発揮することが実験から示されています。
一方で、常識や一般知識を問う問題に対しては効果が限定的であることも明らかになりました。
複雑な問題を段階的に分解・実行する「計画と実行」のプロセスにおいて、CoTの強みが活かされる点も注目ポイントです。
This presentation explores when Chain of Thought (CoT) prompting is truly effective in large language models.
The findings show that CoT significantly improves performance on tasks involving mathematical or logical reasoning, while its impact is limited on general knowledge or commonsense tasks.
Decoding Kotlin - Your Guide to Solving the Mysterious in Kotlin - Devoxx PL ...João Esperancinha
Kotlin can be very handy and easy to use. Kotlin offers the possibility to develop code that is easy to understand, safe, immutable, and thus predictable and follows standards that avoid side effects. I realized that very quickly after I started my Kotlin journey that already amounts to more than 5 years.
This is the third version of this presentation focused on more detail explaining inline, crossinline, tailrec and as a bonus a quick run through unnamed classes.
2. • XML stands for Extensible Markup Language. It is a text-based
markup language derived from Standard Generalized Markup
Language (SGML).
• XML is a markup language that defines set of rules for encoding
documents in a format that is both human-readable and machine-
readable.
• XML tags identify the data and are used to store and organize the
data, rather than specifying how to display it like HTML tags, which
are used to display the data.
• There are three important characteristics of XML
– XML is extensible − XML allows you to create your own self-
descriptive tags, or language, that suits your application.
– XML carries the data, does not present it − XML allows you to store
the data irrespective of how it will be presented.
– XML is a public standard − XML was developed by an organization
called the World Wide Web Consortium (W3C) and is available as an
open standard.
3. XML Usage
• XML can be used to exchange the information
between organizations and systems.
• XML can be used for offloading and reloading of
databases.
• XML can be used to store and arrange the data,
which can customize your data handling needs.
• XML can easily be merged with style sheets to
create almost any desired output.
• Virtually, any type of data can be expressed as an
XML document.
4. • Following example shows how XML markup looks,
when embedded in a piece of text −
<message>
<text>Hello, world!</text>
</message>
• This snippet includes the markup symbols, or the tags
such as <message>...</message> and <text>... </text>.
• The tags <message> and </message> mark the start
and the end of the XML code fragment.
• The tags <text> and </text> surround the text Hello,
world!.
5. Is XML a Programming Language?
• A programming language consists of grammar
rules and its own vocabulary which is used to
create computer programs.
• These programs instruct the computer to
perform specific tasks.
• XML does not qualify to be a programming
language as it does not perform any
computation or algorithms.
• It is usually stored in a simple text file and is
processed by special software that is capable of
interpreting XML.
6. XML - Syntax
Following is a complete XML document
<?xml version = "1.0"?>
<contact-info>
<name>Mr.R.Rajan</name>
<company>AAMEC</company>
<phone>(04376) 1234567</phone>
</contact-info>
There are two kinds of information in the above example
– Markup, like <contact-info>
– The text, or the character data, AAMEC and (04376)
1234567
7. • The following diagram depicts the syntax rules
to write different types of markup and text in
an XML document.
8. XML Declaration
• The XML document can optionally have an XML
declaration. It is written as follows −
<?xml version = "1.0" encoding = "UTF-8"?>
Where version is the XML version and encoding specifies
the character encoding used in the document.
Syntax Rules for XML Declaration
• The XML declaration is case sensitive and must begin with
"<?xml>" where "xml" is written in lower-case.
• If document contains XML declaration, then it strictly
needs to be the first statement of the XML document.
• An HTTP protocol can override the value of encoding that
you put in the XML declaration.
9. Tags and Elements
• An XML file is structured by several XML-
elements, also called XML-nodes or XML-tags.
• The names of XML-elements are enclosed in
triangular brackets < > as shown below
<element>
Syntax Rules for Tags and Elements
Element Syntax
• Each XML-element needs to be closed either with
start or with end elements as shown below
<element>....</element>
or in simple-cases, just this way
<element/>
10. Nesting of Elements
• An XML-element can contain multiple XML-elements as its
children, but the children elements must not overlap.
• The Following example shows incorrect nested tags
<?xml version = "1.0"?>
<contact-info>
<company>TutorialsPoint <contact-info>
</company>
• The Following example shows correct nested tags −
<?xml version = "1.0"?>
<contact-info>
<company>TutorialsPoint</company>
<contact-info>
11. Root Element
• An XML document can have only one root element.
• For example, following is not a correct XML document, because both the
x and y elements occur at the top level without a root element
<x>...</x>
<y>...</y>
• The Following example shows a correctly formed XML document
<root>
<x>...</x>
<y>...</y>
</root>
Case Sensitivity
• The names of XML-elements are case-sensitive. That means the name of
the start and the end elements need to be exactly in the same case.
• For example, <contact-info> is different from <Contact-Info>
12. XML Attributes
• An attribute specifies a single property for the
element, using a name/value pair.
• An XML-element can have one or more attributes.
For example
<a href = "http://www.tutorialspoint.com/">
Tutorialspoint!
</a>
• Here href is the attribute name and
http://www.tutorialspoint.com/ is attribute value.
13. Syntax Rules for XML Attributes
• Attribute names in XML (unlike HTML) are case
sensitive. That is, HREF and href are considered two
different XML attributes.
• Same attribute cannot have two values in a syntax.
• The following example shows incorrect syntax because
the attribute b is specified twice
<a b = "x" c = "y" b = "z">....</a>
• Attribute names are defined without quotation marks,
whereas attribute values must always appear in
quotation marks.
• Following example demonstrates incorrect xml syntax
<a b = x>....</a>
14. XML References
• References usually allow you to add or include
additional text or markup in an XML document.
• References always begin with the symbol "&" which is
a reserved character and end with the symbol ";".
XML has two types of references
• Entity References − An entity reference contains a
name between the start and the end delimiters. For
example & where amp is name. The name refers
to a predefined string of text and/or markup.
• Character References − These contain references, such
as A, contains a hash mark (“#”) followed by a
number. The number always refers to the Unicode
code of a character. In this case, 65 refers to alphabet
"A".
15. XML Text
• The names of XML-elements and XML-attributes are case-sensitive, which
means the name of start and end elements need to be written in the same
case.
• To avoid character encoding problems, all XML files should be saved as
Unicode UTF-8 or UTF-16 files.
• Whitespace characters like blanks, tabs and line-breaks between XML-
elements and between the XML-attributes will be ignored.
• Some characters are reserved by the XML syntax itself. Hence, they
cannot be used directly.
16. XML - Documents
• An XML document is a basic unit of XML information composed of elements and
other markup in an orderly package.
• An XML document can contains wide variety of data.
• For example, database of numbers, numbers representing molecular structure or a
mathematical equation.
XML Document Example
A simple document is shown in the following example
The following image depicts the parts of XML document.
17. Parts of XML document
1.Document Prolog Section
• Document Prolog comes at the top of the document, before the root
element.
• This section contains
– XML declaration
– Document type declaration
2. Document Elements Section
• Document Elements are the building blocks of XML. These divide the
document into a hierarchy of sections, each serving a specific purpose.
• You can separate a document into multiple sections so that they can
be rendered differently, or used by a search engine.
• The elements can be containers, with a combination of text and other
elements.
18. XML - DTDs
• The XML Document Type Declaration, commonly
known as DTD, is a way to describe XML language
precisely.
• DTDs check vocabulary and validity of the
structure of XML documents against grammatical
rules of appropriate XML language.
• An XML DTD can be either specified inside the
document, or it can be kept in a separate
document and then liked separately.
19. Syntax
Basic syntax of a DTD is as follows −
<!DOCTYPE element DTD identifier
[
declaration1
declaration2 ........
]>
In the above syntax,
• The DTD starts with <!DOCTYPE delimiter.
• An element tells the parser to parse the document from the specified root
element.
• DTD identifier is an identifier for the document type definition, which may be
the path to a file on the system or URL to a file on the internet. If the DTD is
pointing to external path, it is called External Subset.
• The square brackets [ ] enclose an optional list of entity declarations called
Internal Subset.
20. Internal DTD
• A DTD is referred to as an internal DTD if
elements are declared within the XML files.
• To refer it as internal DTD, standalone attribute
in XML declaration must be set to yes.
• This means, the declaration works independent
of an external source.
Syntax
<!DOCTYPE root-element [element-declarations]>
where root-element is the name of root element
and element-declarations is where you declare
the elements.
21. Example
<?xml version = "1.0" encoding = "UTF-8" standalone = "yes" ?>
<!DOCTYPE address [
<!ELEMENT address (name,company,phone)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT company (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
]>
<address>
<name>Tanmay Patil</name>
<company>TutorialsPoint</company>
<phone>(011) 123-4567</phone>
</address>
22. Start Declaration
• Begin the XML declaration with the following statement.
<?xml version = "1.0" encoding = "UTF-8" standalone = "yes" ?>
DTD
• Immediately after the XML header, the document type declaration
follows, commonly referred to as the DOCTYPE −
<!DOCTYPE address [
• The DOCTYPE declaration has an exclamation mark (!) at the start
of the element name.
• The DOCTYPE informs the parser that a DTD is associated with this
XML document.
DTD Body
• The DOCTYPE declaration is followed by body of the DTD, where
you declare elements, attributes, entities, and notations.
<!ELEMENT address (name,company,phone)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT company (#PCDATA)>
<!ELEMENT phone_no (#PCDATA)>
23. • Several elements are declared here that make up the
vocabulary of the <name> document.
• <!ELEMENT name (#PCDATA)> defines the element
name to be of type "#PCDATA".
• Here #PCDATA means parse-able text data.
End Declaration
• Finally, the declaration section of the DTD is closed
using a closing bracket and a closing angle bracket (]>).
• This effectively ends the definition, and thereafter, the
XML document follows immediately.
24. External DTD
• In external DTD elements are declared outside the XML file.
• They are accessed by specifying the system attributes
which may be either the legal .dtd file or a valid URL.
• To refer it as external DTD, standalone attribute in the XML
declaration must be set as no. This means, declaration
includes information from the external source.
Syntax
<!DOCTYPE root-element SYSTEM "file-name">
where file-name is the file with .dtd extension.
25. Example
<?xml version = "1.0" encoding = "UTF-8" standalone = "no" ?>
<!DOCTYPE address SYSTEM "address.dtd">
<address>
<name>Tanmay Patil</name>
<company>TutorialsPoint</company>
<phone>(011) 123-4567</phone>
</address>
The content of the DTD file address.dtd is as shown
<!ELEMENT address (name,company,phone)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT company (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
26. Types
• You can refer to an external DTD by using either system
identifiers or public identifiers.
System Identifiers
• A system identifier enables you to specify the location of an
external file containing DTD declarations.
• Syntax is as follows −
<!DOCTYPE name SYSTEM "address.dtd" [...]>
Public Identifiers
• Public identifiers provide a mechanism to locate DTD
resources and is written as follows −
<!DOCTYPE name PUBLIC "-//Beginning XML//DTD Address Example//EN">
• Public identifiers are used to identify an entry in a catalog.
Public identifiers can follow any format, however, a
commonly used format is called Formal Public Identifiers,
or FPIs.
27. XML - Namespaces
• A Namespace is a set of unique names.
• Namespace is a mechanisms 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 −
<element xmlns:name = "URL">
Syntax
• The Namespace starts with the keyword xmlns.
• The word name is the Namespace prefix.
• The URL is the Namespace identifier.
28. Example
• Namespace affects only a limited area in the document.
• An element containing the declaration and all of its descendants
are in the scope of the Namespace.
• Following is a simple example of XML Namespace −
<?xml version = "1.0" encoding = "UTF-8"?>
<cont:contact xmlns:cont = "www.tutorialspoint.com/profile">
<cont:name>Tanmay Patil</cont:name>
<cont:company>TutorialsPoint</cont:company>
<cont:phone>(011) 123-4567</cont:phone>
</cont:contact>
• Here, the Namespace prefix is cont, and the Namespace identifier
(URI) as www.tutorialspoint.com/profile.
• This means, the element names and attribute names with the cont
prefix (including the contact element), all belong to the
www.tutorialspoint.com/profile namespace.
29. XSLT Overview
XSL
• Before learning XSLT, we should first understand XSL which stands for EXtensible
Stylesheet Language. It is similar to XML as CSS is to HTML.
Need for XSL
• In case of HTML document, tags are predefined such as table, div, and span; and the
browser knows how to add style to them and display those using CSS styles. But in
case of XML documents, tags are not predefined.
• In order to understand and style an XML document, World Wide Web Consortium
(W3C) developed XSL which can act as XML based Stylesheet Language.
• An XSL document specifies how a browser should render an XML document.
Following are the main parts of XSL
• XSLT − used to transform XML document into various other types of document.
• XPath − used to navigate XML document.
• XSL-FO − used to format XML document.
30. What is XSLT
• XSLT, Extensible Stylesheet Language Transformations,
provides the ability to transform XML data from one
format to another automatically.
How XSLT Works
• An XSLT stylesheet is used to define the transformation
rules to be applied on the target XML document.
• XSLT stylesheet is written in XML format.
• XSLT Processor takes the XSLT stylesheet and applies
the transformation rules on the target XML document
and then it generates a formatted document in the
form of XML, HTML, or text format.
• This formatted document is then utilized by XSLT
formatter to generate the actual output which is to be
displayed to the end-user.
31. Advantages
• Independent of programming. Transformations are written in a separate
xsl file which is again an XML document.
• Output can be altered by simply modifying the transformations in xsl file.
No need to change any code. So Web designers can edit the stylesheet
and can see the change in the output quickly.
33. • We need to define an XSLT style sheet
document for the above XML document to
meet the following criteria −
– Page should have a title Students.
– Page should have a table of student details.
– Columns should have following headers: Roll No,
First Name, Last Name, Nick Name, Marks
– Table must contain details of the students
accordingly.
34. Step 1: Create XSLT document
• Create an XSLT document to meet the above
requirements, name it as students.xsl and
save it in the same location where
students.xml lies.
36. Step 2: Link the XSLT Document to the XML
Document
• Update student.xml document with the following
xml-stylesheet tag. Set href value to students.xsl
<?xml version = "1.0"?>
<?xml-stylesheet type = "text/xsl" href =
"students.xsl"?>
<class>
...
</class>
37. Step 3: View the XML Document in Internet Explorer
students.xml
<?xml version = "1.0"?>
<?xml-stylesheet type = "text/xsl" href = "students.xsl"?>
<class>
<student rollno = "393">
<firstname>Dinkar</firstname>
<lastname>Kad</lastname>
<nickname>Dinkar</nickname>
<marks>85</marks>
</student>
<student rollno = "493">
<firstname>Vaneet</firstname>
<lastname>Gupta</lastname>
<nickname>Vinni</nickname>
<marks>95</marks>
</student>
<student rollno = "593">
<firstname>Jasvir</firstname>
<lastname>Singh</lastname>
<nickname>Jazz</nickname>
<marks>90</marks>
</student> </class>
39. Write an XML file to store information of books.
book.xml
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies,
an evil sorceress, and her own childhood to become queen
of the world.</description>
</book>
</catalog>
40. Write an XSL file to print the list of
products with the price > 100 rs. For
item.xml in tabular form.
item.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"
href="itemstyle.xsl"?>
<item>
<product> <name>Shirt</name>
<price>300</price>
</product>
<product> <name>Jeans</name>
<price>350</price>
</product>
<product>
<name>T-shirt</name>
<price>200</price>
</product>
</item>
itemstyle.xsl:
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0"xmlns:xsl="http://www.w3.o
rg/1999/XSL/Transform">
<xsl:template match="/">
<html> <body>
<table border="1">
<tr> <th>Product</th>
<th>Price</th>
</tr>
<xsl:for-each select="item/product">
<xsl:if test="price > 100">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="price"/>
</td>
</tr>
</xsl:if> </xsl:for-each> </table> </body>
</html></xsl:template></xsl:stylesheet>
41. Webservices
A Web Service is can be defined by following ways:
• is a client server application or application component for communication.
• method of communication between two devices over network.
• is a software system for interoperable machine to machine communication.
• is a collection of standards or protocols for exchanging information between two
devices or application.
To summarize, a complete web service is, therefore, any service that −Web service,
• Is available over the Internet or private (intranet) networks
• Uses a standardized XML messaging system
• Is not tied to any one operating system or programming language
• Is self-describing via a common XML grammar
• Is discoverable via a simple find mechanism
Characteristics:
• XML-Based
• Loosely Coupled
• Coarse-Grained
• Ability to be Synchronous or Asynchronous
• Supports Remote Procedure Calls(RPCs)
• Supports Document Exchange
42. How Does a Web Service Work?
• A web service enables communication among various
applications by using open standards such as HTML, XML,
WSDL, and SOAP. A web service takes the help of −
– XML to tag the data
– SOAP to transfer a message
– WSDL to describe the availability of service.
• You can build a Java-based web service on Solaris that is
accessible from your Visual Basic program that runs on
Windows.
• You can also use C# to build new web services on Windows
that can be invoked from your web application that is based
on JavaServer Pages (JSP) and runs on Linux.
43. Benefits of using Web Services
1. Exposing the Existing Function on the network
2. Interoperability
3. Standardized Protocol
4. Low Cost Communication
44. Web Service Components
There are three major web service components.
– SOAP
– WSDL
– UDDI
SOAP
• SOAP is an acronym for Simple Object Access Protocol.
• SOAP is a XML-based protocol for accessing web services.
• SOAP is a W3C recommendation for communication between applications.
• SOAP is XML based, so it is platform independent and language independent. In other words, it can be used with Java, .Net or PHP
language on any platform.
WSDL
• WSDL is an acronym for Web Services Description Language.
• WSDL is a xml document containing information about web services such as method name, method parameter and how to access it.
• WSDL is a part of UDDI. It acts as a interface between web service applications.
• WSDL is pronounced as wiz-dull.
UDDI
• UDDI is an acronym for Universal Description, Discovery and Integration.
• UDDI is a XML based framework for describing, discovering and integrating web services.
• UDDI is a directory of web service interfaces described by WSDL, containing information about web services
45. • The UDDI technical architecture consists of three parts −
• UDDI Data Model
• UDDI Data Model is an XML Schema for describing businesses and web services.
The data model is described in detail in the "UDDI Data Model" chapter.
• UDDI API Specification
• It is a specification of API for searching and publishing UDDI data.
• UDDI Cloud Services
• These are operator sites that provide implementations of the UDDI specification
and synchronize all data on a scheduled basis.
46. • The UDDI Business Registry (UBR), also known as the Public Cloud, is a
conceptually single system built from multiple nodes having their data
synchronized through replication.
• The current cloud services provide a logically centralized, but physically
distributed, directory. It means the data submitted to one root node will
automatically be replicated across all the other root nodes. Currently, data
replication occurs every 24 hours.
• UDDI cloud services are currently provided by Microsoft and IBM. Ariba had
originally planned to offer an operator as well, but has since backed away from the
commitment. Additional operators from other companies, including Hewlett-
Packard, are planned for the near future.
• It is also possible to set up private UDDI registries. For example, a large company
may set up its own private UDDI registry for registering all internal web services.
As these registries are not automatically synchronized with the root UDDI nodes,
they are not considered as a part of the UDDI cloud.
47. UDDI includes an XML Schema that describes the following data structures −
• businessEntity
• businessService
• bindingTemplate
• tModel
• publisherAssertion
businessEntity Data Structure
• The business entity structure represents the provider of web services. Within the
UDDI registry, this structure contains information about the company itself,
including contact information, industry categories, business identifiers, and a list
of services provided.
• Here is an example of a fictitious business's UDDI registry entry −
48. <businessEntity businessKey = "uuid:C0E6D5A8-C446-4f01-99DA-70E212685A40"
operator = "http://www.ibm.com" authorizedName = "John Doe"> <name>Acme Company</name>
<description> We create cool Web services
</description>
<contacts> <contact useType = "general info">
<description>General Information
</description>
<personName>John Doe</personName>
<phone>(123) 123-1234</phone>
<email>[email protected]</email>
</contact> </contacts>
<businessServices> ...
</businessServices>
<identifierBag>
<keyedReference tModelKey = "UUID:8609C81E-EE1F-4D5A-B202-3EB13AD01823" name = "D-U-N-S" value =
"123456789" />
</identifierBag>
<categoryBag>
<keyedReference tModelKey = "UUID:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2" name = "NAICS" value =
"111336" />
</categoryBag>
</businessEntity>
49. • businessService Data Structure
• The business service structure represents an individual web service provided by the business
entity. Its description includes information on how to bind to the web service, what type of
web service it is, and what taxonomical categories it belongs to.
• Here is an example of a business service structure for the Hello World web service.
<businessService serviceKey = "uuid:D6F1B765-BDB3-4837-828D-8284301E5A2A" businessKey =
"uuid:C0E6D5A8-C446-4f01-99DA-70E212685A40">
<name>Hello World Web Service</name>
<description>A friendly Web service</description>
<bindingTemplates> ... </bindingTemplates>
<categoryBag />
</businessService>
• Notice the use of the Universally Unique Identifiers (UUIDs) in the businessKey and
serviceKey attributes. Every business entity and business service is uniquely identified in all
the UDDI registries through the UUID assigned by the registry when the information is first
entered.
50. • bindingTemplate Data Structure
• Binding templates are the technical descriptions of the web services represented by the
business service structure. A single business service may have multiple binding templates.
The binding template represents the actual implementation of the web service.
• Here is an example of a binding template for Hello World.
• <bindingTemplate serviceKey = "uuid:D6F1B765-BDB3-4837-828D-8284301E5A2A"
bindingKey = "uuid:C0E6D5A8-C446-4f01-99DA-70E212685A40"> <description>Hello World
SOAP Binding</description> <accessPoint URLType =
"http">http://localhost:8080</accessPoint> <tModelInstanceDetails> <tModelInstanceInfo
tModelKey = "uuid:EB1B645F-CF2F-491f-811A-4868705F5904"> <instanceDetails>
<overviewDoc> <description> references the description of the WSDL service definition
</description> <overviewURL> http://localhost/helloworld.wsdl </overviewURL>
</overviewDoc> </instanceDetails> </tModelInstanceInfo> </tModelInstanceDetails>
</bindingTemplate> As a business service may have multiple binding templates, the service
may specify different implementations of the same service, each bound to a different set of
protocols or a different network address.
51. • tModel Data Structure
• tModel is the last core data type, but potentially the most difficult to grasp.
tModel stands for technical model.
• tModel is a way of describing the various business, service, and template
structures stored within the UDDI registry. Any abstract concept can be registered
within the UDDI as a tModel. For instance, if you define a new WSDL port type,
you can define a tModel that represents that port type within the UDDI. Then, you
can specify that a given business service implements that port type by associating
the tModel with one of that business service's binding templates.
• Here is an example of a tModel representing the Hello World Interface port type.
• <tModel tModelKey = "uuid:xyz987..." operator = "http://www.ibm.com"
authorizedName = "John Doe"> <name>HelloWorldInterface Port Type</name>
<description> An interface for a friendly Web service </description>
<overviewDoc> <overviewURL> http://localhost/helloworld.wsdl </overviewURL>
</overviewDoc> </tModel>
52. • publisherAssertion Data Structure
• This is a relationship structure putting into association two or more businessEntity
structures according to a specific type of relationship, such as subsidiary or
department.
• The publisherAssertion structure consists of the three elements: fromKey (the first
businessKey), toKey (the second businessKey), and keyedReference.
• The keyedReference designates the asserted relationship type in terms of a
keyName keyValue pair within a tModel, uniquely referenced by a tModelKey.
• <element name = "publisherAssertion" type = "uddi:publisherAssertion" />
<complexType name = "publisherAssertion"> <sequence> <element ref =
"uddi:fromKey" /> <element ref = "uddi:toKey" /> <element ref =
"uddi:keyedReference" /> </sequence> </complexType>
53. WSDL
• WSDL stands for Web Services Description Language. It is the standard format for describing a
web service. WSDL was developed jointly by Microsoft and IBM.
Features of WSDL
• WSDL is an XML-based protocol for information exchange in decentralized and distributed
environments.
• WSDL definitions describe how to access a web service and what operations it will perform.
• WSDL is a language for describing how to interface with XML-based services.
• WSDL is an integral part of Universal Description, Discovery, and Integration (UDDI), an XML-
based worldwide business registry.
• WSDL is the language that UDDI uses.
• WSDL is pronounced as 'wiz-dull' and spelled out as 'W-S-D-L'.
WSDL Usage
• WSDL is often used in combination with SOAP and XML Schema to provide web services over the
Internet. A client program connecting to a web service can read the WSDL to determine what
functions are available on the server. Any special datatypes used are embedded in the WSDL file
in the form of XML Schema. The client can then use SOAP to actually call one of the functions
listed in the WSDL.
64. Java Web Services
• Java web services tutorial provides concepts and
examples of two main java web services api: JAX-WS
and JAX-RS. The java web service application can be
accessed by other programming languages such
as .Net and PHP.
• Java web service application perform
communication through WSDL (Web Services
Description Language). There are two ways to write
java web service application code: SOAP and
RESTful.
65. • Java Web Services API
• There are two main API's defined by Java for
developing web service applications since JavaEE 6.
• 1) JAX-WS: for SOAP web services. The are two
ways to write JAX-WS application code: by RPC
style and Document style.
• 2) JAX-RS: for RESTful web services. There are
mainly 2 implementation currently in use for
creating JAX-RS application: Jersey and RESTeasy.
66. JAX-WS Tutorial
• JAX-WS tutorial is provides concepts and examples of JAX-WS API. This
JAX-WS tutorial is designed for beginners and professionals.
• There are two ways to develop JAX-WS example.
– RPC style
– Document style
67. Difference between RPC and Document web services
There are many differences between RPC and Document web services. The important differences between RPC and Document
are given below:
RPC Style
1) RPC style web services use method name and parameters to generate XML structure.
2) The generated WSDL is difficult to be validated against schema.
3) In RPC style, SOAP message is sent as many elements.
4) RPC style message is tightly coupled.
5) In RPC style, SOAP message keeps the operation name.
6) In RPC style, parameters are sent as discrete values.
Let's see the RPC style generated WSDL file.
WSDL file: In WSDL file, it doesn't specify the types details.
<types/>
For message part, it defines name and type attributes.
<message name="getHelloWorldAsString">
<part name="arg0" type="xsd:string"/>
</message>
<message name="getHelloWorldAsStringResponse">
<part name="return" type="xsd:string"/>
</message>
69. • Document Style
• 1) Document style web services can be validated against predefined schema.
• 2) In document style, SOAP message is sent as a single document.
• 3) Document style message is loosely coupled.
• 4) In Document style, SOAP message loses the operation name.
• 5) In Document style, parameters are sent in XML format.
• Let's see the Document style generated WSDL file.
• WSDL file: In WSDL file, it specifies types details having namespace and schemaLocation.
• <types>
• <xsd:schema>
• <xsd:import namespace="http://javatpoint.com/" schemaLocation="http://localhost:7779/ws/hello?xsd=1"/>
• </xsd:schema>
• </types>
• For message part, it defines name and element attributes.
• <message name="getHelloWorldAsString">
• <part name="parameters" element="tns:getHelloWorldAsString"/>
• </message>
• <message name="getHelloWorldAsStringResponse">
• <part name="parameters" element="tns:getHelloWorldAsStringResponse"/>
• </message>
70. • For soap:body, it defines use attribute only not namespace.
• <binding name="HelloWorldImplPortBinding" type="tns:HelloWorld">
• <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
• <operation name="getHelloWorldAsString">
• <soap:operation soapAction=""/>
• <input>
• <soap:body use="literal"/>
• </input>
• <output>
• <soap:body use="literal"/>
• </output>
• </operation>
• </binding>
•