SlideShare a Scribd company logo
XML presentation
By Alejandro herreño y Miguel Teheran
2.1 XML (Extensible Markup Language)
XML stands for Extensible Markup Language. It is a text-based markup language
derived from Standard Generalized Markup Language (SGML).
Main characteristics:
● XML is extensible
● XML carries the data, does not present it
● XML is a public standard
2.2 XML Documents
What‘s in an XML document?
• Elements
• Attributes
A Simple XML Document
<article>
<author>Gerhard Weikum</author>
<title>The Web in Ten Years</title>
<text>
<abstract>In order to evolve...</abstract>
<section number=“1” title=“Introduction”> The
<index>Web</index> provides the universal...
</section>
</text>
</article>
DEMO
REPRESENTACIÓN CONCEPTUAL DE ENTIDADE DE SITERRA EN UN XML
XML Siterra Example
More on XML Syntax
Some special characters must be escaped using entities:
< → &lt;
& → &amp;
(will be converted back when reading the XML doc)
Some other characters may be escaped, too:
> → &gt;
“ → &quot;
‘ → &apos;
More on XML Syntax EXAMPLE
<message>salary &lt; 1000</message>
<!-- This is a -- comment -->
<Message>This is incorrect</message>
<message>This is correct</message>
DEMO - WHERE IS THE ERROR?
<?xml version="1.0"?>
<catalog>
<book id="bk101" publish-"true">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer <cc></genre>
<description>An in-depth look at creating applications
with XML.<description>
<book>
<book id="bk102 publish-"true">
<author>Ralls, Kim</author>
<Title>Midnight Rain</title>
<genre>Fantasy</genre>
<description>A former architect battles corporate zombies,
an evil sorceress, and her own childhood to become queen
of the world.<description>
</book>
<catalog>
DEMO SOLUTION
<?xml version="1.0"?>
<catalog>
<book id="bk101" publish-"true">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer <cc></genre>
<description>An in-depth look at creating applications
with XML.<description>
<book>
<book id="bk102" publish-"true">
<author>Ralls, Kim</author>
<Title>Midnight Rain</title>
<genre>Fantasy</genre>
<description>A former architect battles corporate zombies,
an evil sorceress, and her own childhood to become queen
of the world.<description>
</book>
</catalog>
Namespaces
XML Namespaces provide a method to avoid element name conflicts.
Example:
<table>
<tr>
<td>Apples</td>
<td>Bananas</td>
</tr>
</table>
<table>
<name>African Coffee Table</name>
<width>80</width>
<length>120</length>
</table>
Namespaces
<h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
<f:table>
<f:name>African Coffee Table</f:name>
<f:width>80</f:width>
<f:length>120</f:length>
</f:table>
Importance of XML
- Data transfer
- Files Config (App.config, Web.config)
- Schemas and Templates
- Devices
- External services
- Documentation
- File Format
Quick questions
- Is XML key sensitive?
- Mentions 2 special characters in XML
- Mentions 2 additional document formats
- What is the difference between element and attribute in XML?
Querying XML Data
Querying XML with XPath and XQuery
XPath and XQuery are query languages for XML data, both standardized by the W3C and
supported by various database products. Their search capabilities include
•logical conditions over element and attribute content (first-order predicate logic a la SQL;
simple conditions only in XPath)
•regular expressions for pattern matching of element names along paths or subtrees within
XML data + joins, grouping, aggregation, transformation, etc. (XQuery only)
In contrast to database query languages like SQL an XML query does not necessarily (need
to) know a fixed structural schema for the underlying data. A query result is a set of
qualifying nodes, paths, subtrees, or subgraphs from the underyling data graph, or a set of
XML documents constructed from this raw result
XPath
XPath is a simple language to identify parts of the XML document (for further
processing)
• XPath operates on the tree representation of the document
• Result of an XPath expression is a set of elements or attributes
• Discuss abbreviated version of XPath
Elements of XPath
• An XPath expression usually is a location path that consists of location steps, separated by /:
/article/text/abstract: selects all abstractelements
• A leading / always means the root element
• Each location step is evaluated in the context of a node in the tree, the so-called context node
• Possible location steps:
–child element x: select all child elements with name x –Attribute @x: select all attributes with name x
–Wildcards *(any child), @*(any attribute)
–Multiple matches, separated by |: x|y|z
XPATH Expressions
Xpath Axes
XPath Comparison Operators
XPath String Functions
XPath Wild Card
XPATH Additional Concepts
● Absolute Path / Relative Path
● Axes
XPath by Example
EXPRESSIONS
● / -----DOCUMENT FROM THE ROOT NODE
● //TASK ----- ALL THE TASK NODE
● //TASK/@ADHOC --- THE VALUE OF THE TASK ATRIBUTE "ADHOC"
● //BLL:PROPERTY --- ALL THE PROPERTY ELEMENTS
● //BLL:PROPERTY[1] --- THE FIRST PROPERTY ELEMENT
● //BLL:PROPERTY[@DATATYPE] ---- ALL THE PROPERTY WITH AN ARGUMENT "DATATYPE "
● //TASK
AXES
● //BLL:PROPERTIES/child::node() --- CHILD NODES OF PROPERTIES
● //BLL:PROPERTY[1]/following::node() --- FOLLOWING NODES
OPERATORS
● //BLL:OPTION[@NAME = "Carrier"
● //BLL:PROPERTY[@NAME="EVENT_TYPE"]/BLL:OPTIONS/Equipment_Upgrade/text() --- text

More Related Content

PDF
Cyber Security - Unit - 1 - Systems Vulnerability Scanning Overview of Vulner...
PPTX
Html ppt
PPTX
Extensible Markup Language (XML)
PPTX
Machine learning ppt
PPTX
Character Design
Cyber Security - Unit - 1 - Systems Vulnerability Scanning Overview of Vulner...
Html ppt
Extensible Markup Language (XML)
Machine learning ppt
Character Design

What's hot (20)

PPT
Introduction to XML
PPTX
Xml ppt
PPTX
HTML: Tables and Forms
PPTX
Unit ii java script and xhtml documents and dynamic documents with javascript
PPTX
Html frames
PPTX
html-table
PPT
Introduction to JavaScript
PPT
Scripting languages
KEY
HTML presentation for beginners
PPTX
Html formatting
PPTX
PPT
Introduction to JavaScript (1).ppt
PPTX
HTML Forms
PPT
UML Diagrams
PDF
State chart diagram
PPTX
An Overview of HTML, CSS & Java Script
PPTX
Html coding
PPT
10. XML in DBMS
Introduction to XML
Xml ppt
HTML: Tables and Forms
Unit ii java script and xhtml documents and dynamic documents with javascript
Html frames
html-table
Introduction to JavaScript
Scripting languages
HTML presentation for beginners
Html formatting
Introduction to JavaScript (1).ppt
HTML Forms
UML Diagrams
State chart diagram
An Overview of HTML, CSS & Java Script
Html coding
10. XML in DBMS
Ad

Similar to Xml presentation (20)

PPT
1 xml fundamentals
PPTX
eXtensible Markup Language (XML)
PPTX
Introduction to XSLT
PPT
Xml and DTD's
PPTX
WEB PROGRAMMING
PDF
XML-Javascript
PDF
XML-Javascript
PPTX
Introduction to xml
DOCX
PPTX
Xml andweb services
PPTX
Xml session
PPTX
Basics of XML
PPTX
Unit3wt
PPTX
Unit3wt
PPTX
Web Information Systems XML
PPTX
programming with xml for graduate students
1 xml fundamentals
eXtensible Markup Language (XML)
Introduction to XSLT
Xml and DTD's
WEB PROGRAMMING
XML-Javascript
XML-Javascript
Introduction to xml
Xml andweb services
Xml session
Basics of XML
Unit3wt
Unit3wt
Web Information Systems XML
programming with xml for graduate students
Ad

More from Miguel Angel Teheran Garcia (20)

PPTX
Pruebas Automatizadas con PlayWright sobre nuestras Google Cloud Functions
PPTX
PlayWright, Cypress, Selenium Cual es la mejor opción para desarrolladores Ja...
PPTX
Introduction to Blazor Hybrid
PPTX
La historia de api-colombia
PPTX
DevFest 2022 - El Arte de escribir sobre programacion.pptx
PPTX
RoadMap y herramientas de Azure DevOps que debes conocer
PPTX
Taller de TDD con .NET y xUnit
PPTX
Introduction to OpenTelemetry in .NET
PPTX
PPTX
.NET MAUI Offline first
PDF
MAUIConf - Adios Net Maui Essentials Bienvenida Integración de Plataforma
PPTX
Servicios Nativos MAUI
PPTX
Aplicaciones para MacOS con .NET MAUI
PPTX
Primero pasos con Visual Studio for MAC
PPTX
Aplicaciones con web con Blazor + MudBlazor
PPTX
Building Web Applications with Blazor and MudBlazor
PPTX
Tips para una entrevista Tech Exitosa
PPTX
Metaverso y Microsoft Mesh
PPTX
Mejoras en Blazor con .NET 6
PPTX
Apis with dotnet postgreSQL and Apsaradb
Pruebas Automatizadas con PlayWright sobre nuestras Google Cloud Functions
PlayWright, Cypress, Selenium Cual es la mejor opción para desarrolladores Ja...
Introduction to Blazor Hybrid
La historia de api-colombia
DevFest 2022 - El Arte de escribir sobre programacion.pptx
RoadMap y herramientas de Azure DevOps que debes conocer
Taller de TDD con .NET y xUnit
Introduction to OpenTelemetry in .NET
.NET MAUI Offline first
MAUIConf - Adios Net Maui Essentials Bienvenida Integración de Plataforma
Servicios Nativos MAUI
Aplicaciones para MacOS con .NET MAUI
Primero pasos con Visual Studio for MAC
Aplicaciones con web con Blazor + MudBlazor
Building Web Applications with Blazor and MudBlazor
Tips para una entrevista Tech Exitosa
Metaverso y Microsoft Mesh
Mejoras en Blazor con .NET 6
Apis with dotnet postgreSQL and Apsaradb

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
L1 - Introduction to python Backend.pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
assetexplorer- product-overview - presentation
PDF
Cost to Outsource Software Development in 2025
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
history of c programming in notes for students .pptx
PDF
medical staffing services at VALiNTRY
PDF
Salesforce Agentforce AI Implementation.pdf
PPTX
Transform Your Business with a Software ERP System
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Navsoft: AI-Powered Business Solutions & Custom Software Development
Odoo Companies in India – Driving Business Transformation.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
L1 - Introduction to python Backend.pptx
How to Choose the Right IT Partner for Your Business in Malaysia
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
assetexplorer- product-overview - presentation
Cost to Outsource Software Development in 2025
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Computer Software and OS of computer science of grade 11.pptx
Why Generative AI is the Future of Content, Code & Creativity?
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Monitoring Stack: Grafana, Loki & Promtail
history of c programming in notes for students .pptx
medical staffing services at VALiNTRY
Salesforce Agentforce AI Implementation.pdf
Transform Your Business with a Software ERP System
Oracle Fusion HCM Cloud Demo for Beginners
Internet Downloader Manager (IDM) Crack 6.42 Build 41

Xml presentation

  • 1. XML presentation By Alejandro herreño y Miguel Teheran
  • 2. 2.1 XML (Extensible Markup Language) XML stands for Extensible Markup Language. It is a text-based markup language derived from Standard Generalized Markup Language (SGML). Main characteristics: ● XML is extensible ● XML carries the data, does not present it ● XML is a public standard
  • 3. 2.2 XML Documents What‘s in an XML document? • Elements • Attributes
  • 4. A Simple XML Document <article> <author>Gerhard Weikum</author> <title>The Web in Ten Years</title> <text> <abstract>In order to evolve...</abstract> <section number=“1” title=“Introduction”> The <index>Web</index> provides the universal... </section> </text> </article>
  • 5. DEMO REPRESENTACIÓN CONCEPTUAL DE ENTIDADE DE SITERRA EN UN XML
  • 7. More on XML Syntax Some special characters must be escaped using entities: < → &lt; & → &amp; (will be converted back when reading the XML doc) Some other characters may be escaped, too: > → &gt; “ → &quot; ‘ → &apos;
  • 8. More on XML Syntax EXAMPLE <message>salary &lt; 1000</message> <!-- This is a -- comment --> <Message>This is incorrect</message> <message>This is correct</message>
  • 9. DEMO - WHERE IS THE ERROR? <?xml version="1.0"?> <catalog> <book id="bk101" publish-"true"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer <cc></genre> <description>An in-depth look at creating applications with XML.<description> <book> <book id="bk102 publish-"true"> <author>Ralls, Kim</author> <Title>Midnight Rain</title> <genre>Fantasy</genre> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.<description> </book> <catalog>
  • 10. DEMO SOLUTION <?xml version="1.0"?> <catalog> <book id="bk101" publish-"true"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer <cc></genre> <description>An in-depth look at creating applications with XML.<description> <book> <book id="bk102" publish-"true"> <author>Ralls, Kim</author> <Title>Midnight Rain</title> <genre>Fantasy</genre> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.<description> </book> </catalog>
  • 11. Namespaces XML Namespaces provide a method to avoid element name conflicts. Example: <table> <tr> <td>Apples</td> <td>Bananas</td> </tr> </table> <table> <name>African Coffee Table</name> <width>80</width> <length>120</length> </table>
  • 13. Importance of XML - Data transfer - Files Config (App.config, Web.config) - Schemas and Templates - Devices - External services - Documentation - File Format
  • 14. Quick questions - Is XML key sensitive? - Mentions 2 special characters in XML - Mentions 2 additional document formats - What is the difference between element and attribute in XML?
  • 16. Querying XML with XPath and XQuery XPath and XQuery are query languages for XML data, both standardized by the W3C and supported by various database products. Their search capabilities include •logical conditions over element and attribute content (first-order predicate logic a la SQL; simple conditions only in XPath) •regular expressions for pattern matching of element names along paths or subtrees within XML data + joins, grouping, aggregation, transformation, etc. (XQuery only) In contrast to database query languages like SQL an XML query does not necessarily (need to) know a fixed structural schema for the underlying data. A query result is a set of qualifying nodes, paths, subtrees, or subgraphs from the underyling data graph, or a set of XML documents constructed from this raw result
  • 17. XPath XPath is a simple language to identify parts of the XML document (for further processing) • XPath operates on the tree representation of the document • Result of an XPath expression is a set of elements or attributes • Discuss abbreviated version of XPath
  • 18. Elements of XPath • An XPath expression usually is a location path that consists of location steps, separated by /: /article/text/abstract: selects all abstractelements • A leading / always means the root element • Each location step is evaluated in the context of a node in the tree, the so-called context node • Possible location steps: –child element x: select all child elements with name x –Attribute @x: select all attributes with name x –Wildcards *(any child), @*(any attribute) –Multiple matches, separated by |: x|y|z
  • 24. XPATH Additional Concepts ● Absolute Path / Relative Path ● Axes
  • 25. XPath by Example EXPRESSIONS ● / -----DOCUMENT FROM THE ROOT NODE ● //TASK ----- ALL THE TASK NODE ● //TASK/@ADHOC --- THE VALUE OF THE TASK ATRIBUTE "ADHOC" ● //BLL:PROPERTY --- ALL THE PROPERTY ELEMENTS ● //BLL:PROPERTY[1] --- THE FIRST PROPERTY ELEMENT ● //BLL:PROPERTY[@DATATYPE] ---- ALL THE PROPERTY WITH AN ARGUMENT "DATATYPE " ● //TASK AXES ● //BLL:PROPERTIES/child::node() --- CHILD NODES OF PROPERTIES ● //BLL:PROPERTY[1]/following::node() --- FOLLOWING NODES OPERATORS ● //BLL:OPTION[@NAME = "Carrier" ● //BLL:PROPERTY[@NAME="EVENT_TYPE"]/BLL:OPTIONS/Equipment_Upgrade/text() --- text