SlideShare a Scribd company logo
1 of 13
Download to read offline
XML
Características
•Transmite contenido y estructura.
•No transmite presentación ni comportamiento. Para que lo haga
se le debe asociar mecanismos adicionales.
•XML para la comunicación entre aplicaciones: representación de
los datos muy simple, fácil de transmitir por la red, estándar. En
los últimos tiempos este uso se está haciendo muy popular con el
surgimiento de los Servicios web.




                                                                     1
•Que fuera idéntico a la hora de servir, recibir, y procesar la
información del HTML para aprovechar toda la tecnología implantada
de este.
•Que fuera normal y conciso desde el punto de vista de los datos y la
manera de guardarlos.
•Que fuera extensible, para que lo puedan utilizar en todos los
campos del conocimiento.
•Que fuese fácil de leer y editar.
•Que fuese fácil de implantar, programar y aplicar a los distintos
sistemas




                                                                    2
Example: A Simple XML Page
<?xml version="1.0"?>
<employees>
  <employee>
    <employee_id>120</employee_id>
    <last_name>Weiss</last_name>
    <salary>8000</salary>
  </employee>
  <employee>
    <employee_id>121</employee_id>
    <last_name>Fripp</last_name>
    <salary>8200</salary>
  </employee>
</employees>
                                     3
XML Document Structure
• An XML document contains the following
  parts:
  1. Prologue
  2. Root element
  3. Epilogue
   <?xml version="1.0" encoding="WINDOWS-1252"?>   1
   <!–- this is a comment -->
   <employees>
    ...                                            2
   </employees>

   <?gifPlayer size="100,300" ?>                   3
                                                       4
The XML Declaration
• XML documents must start with an XML
  declaration.
• The XML declaration:
  – <?xml version="1.0" encoding="WINDOWS-1252"?> xml
    Looks like a processing instruction with the
    <document-root>
    name. For example:
    ...
   </document-root>

  – Must contain the version attribute
  – May (optionally) include:
     • The encoding attribute
     • The standalone attribute
  – Is optional in XML 1.0, but mandatory in XML 1.1    5
Components of an XML Document
• XML documents comprise storage units
  containing:
  – Parsed data, including the:
     • Markup (elements, attributes, entities) used to describe
       the data they contain
     • Character data described by markup
   <?xml version="1.0" encoding="WINDOWS-1252"?>
   <employees>
     <employee id="100">
       <name>Rachael O&apos;Leary</name>
     </employee>
   </employees>
    <![CDATA[   ...unparsed data... ]]>
  – Unparsed data, textual or binary information
    (graphic and sound data) taken as entered                     6
XML Elements
– An XML element:
  • Has a start tag, end tag, and optional data content
  • Tag names are case-sensitive (must be identical)

                                    Tag name
                  <employee>          Start tag
                                                  Data
   Element         <name>Steven King</name>
                                                  content
                  </employee>         End tag
                                     Tag name


– Empty elements:
  • Do not contain any data         <initials></initials>
  • May appear as a single tag                              7
XML Attributes
• An XML attribute is a name-value pair that:
  – Is specified in the start tag, after the tag name
   <?xml version="1.0" encoding="WINDOWS-1252"?>
   <employees>
     <employee id="100" name='Rachael O&apos;Leary'>
       <salary>1000</salary>
     </employee>
   </employees>

  – Has a case-sensitive name
  – Has a case-sensitive value that must be enclosed in
    matching single or double quotes
  – Provides additional information about the XML
    document or XML elements                            8
Using Elements Versus Attributes
 <?xml version="1.0"?>
 <employees>                             1 Elements
   <employee>
     <id>100</id>
     <last_name>King</last_name>
     <salary>24000</salary>
   </employee>
 </employees>

 <?xml version="1.0"?>
 <employees>                             2   Attributes
   <employee id="100" last_name="King"
              salary="24000">
     <job>President</job>
   </employee>
 </employees>


                                                          9
XML Entities
• An XML entity:
  – Is a unit of data storage
  – Is identified by a case-sensitive name
  – Is used as replacement text (substituted) when
    referencing its name between an ampersand (&),
    and a semicolon (;)
    <comment>Salaries must not be &lt; 1000</comment>

  – Has predefined names for special XML characters:
     •   &lt; for less than (<), and &gt; for greater than (>)
     •   &amp; for ampersand (&)
     •   &quot; for double quote (")
     •   &apos; for single quote (')                             10
XML Comments
• XML comments:
  – Start with <!--
  – End with -->
  – May appear anywhere in the character data of a
    document, and before the root element
  – Are not elements, and can occupy multiple lines
  – May not appear inside a tag or another
    comment
  <?xml version="1.0" encoding="WINDOWS-1252"?>
  <!–- Comment: This document has information about
       employees in the company -->
  <employees>
   <name>Steven King</name> <!-- Full name -->
  </employees>
                                                      11
Class Activity
• Identify errors in the following examples:
<?xml version="1.0"?>
<Question>Is this legal?</Question>               1
<Answer>No</Answer>

<!-- An XML document -->
<?xml version="1.0"?>                             2


<Question 4You="Is this attribute name correct"/> 3


<EMAIL ID=Mark.Ant@oracle.com></EMAIL>            4

<Question>Is this legal</question>                5

                                                      12
Class Activity

      1. Both <Question> and <Answer> are top-level elements. You
      can have only one document element per document.
      2. In general, you cannot have a comment before the
      XML declaration, and the root element is required.
      Note: Internet Explorer allows a comment before the
      XML declaration.
      3. The attribute name cannot start with a digit.
      4. The attribute value is not enclosed in quotes.
      5. Opening and closing tag names are case-sensitive
      and must match.




                                                             13

More Related Content

What's hot

02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documentsBaskarkncet
 
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDSORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDSNewyorksys.com
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in androidMahmudul Hasan
 
Lesson01 学会使用基本的SQL语句
Lesson01 学会使用基本的SQL语句Lesson01 学会使用基本的SQL语句
Lesson01 学会使用基本的SQL语句renguzi
 
Eo gaddis java_chapter_16_5e
Eo gaddis java_chapter_16_5eEo gaddis java_chapter_16_5e
Eo gaddis java_chapter_16_5eGina Bullock
 
Analytical Functions for DWH
Analytical Functions for DWHAnalytical Functions for DWH
Analytical Functions for DWHEmrah METE
 
PostgreSQL Tutorial For Beginners | Edureka
PostgreSQL Tutorial For Beginners | EdurekaPostgreSQL Tutorial For Beginners | Edureka
PostgreSQL Tutorial For Beginners | EdurekaEdureka!
 
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1Dan D'Urso
 
Sql Pass Through
Sql Pass ThroughSql Pass Through
Sql Pass Throughjrhampt
 

What's hot (20)

02 well formed and valid documents
02 well formed and valid documents02 well formed and valid documents
02 well formed and valid documents
 
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDSORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
 
XML
XMLXML
XML
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in android
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Lesson01 学会使用基本的SQL语句
Lesson01 学会使用基本的SQL语句Lesson01 学会使用基本的SQL语句
Lesson01 学会使用基本的SQL语句
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
 
XML - The Extensible Markup Language
XML - The Extensible Markup LanguageXML - The Extensible Markup Language
XML - The Extensible Markup Language
 
XML
XMLXML
XML
 
Eo gaddis java_chapter_16_5e
Eo gaddis java_chapter_16_5eEo gaddis java_chapter_16_5e
Eo gaddis java_chapter_16_5e
 
Analytical Functions for DWH
Analytical Functions for DWHAnalytical Functions for DWH
Analytical Functions for DWH
 
XML DTD Validate
XML DTD ValidateXML DTD Validate
XML DTD Validate
 
PostgreSQL Tutorial For Beginners | Edureka
PostgreSQL Tutorial For Beginners | EdurekaPostgreSQL Tutorial For Beginners | Edureka
PostgreSQL Tutorial For Beginners | Edureka
 
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
 
Introduction to Oracle
Introduction to OracleIntroduction to Oracle
Introduction to Oracle
 
Xml andweb services
Xml andweb services Xml andweb services
Xml andweb services
 
Intro
IntroIntro
Intro
 
Oracle SQL Part 2
Oracle SQL Part 2Oracle SQL Part 2
Oracle SQL Part 2
 
SQL Differences SQL Interview Questions
SQL Differences  SQL Interview QuestionsSQL Differences  SQL Interview Questions
SQL Differences SQL Interview Questions
 
Sql Pass Through
Sql Pass ThroughSql Pass Through
Sql Pass Through
 

Viewers also liked

Android de la A a la Z Actividades ulises gonzalez
Android de la A a la Z   Actividades ulises gonzalezAndroid de la A a la Z   Actividades ulises gonzalez
Android de la A a la Z Actividades ulises gonzalezAndroid UNAM
 
Todo trabajo es temporal
Todo trabajo es temporalTodo trabajo es temporal
Todo trabajo es temporalAndroid UNAM
 
Curso Taller Android Procesado Imagen
Curso Taller Android Procesado ImagenCurso Taller Android Procesado Imagen
Curso Taller Android Procesado ImagenEmilio Aviles Avila
 
operaciones aritméticas usando
operaciones aritméticas  usando operaciones aritméticas  usando
operaciones aritméticas usando Sarahi Garcia Ruiz
 
Servicio de desarrollo de Apps para iPhone, Android y Kindle ofrecido por App...
Servicio de desarrollo de Apps para iPhone, Android y Kindle ofrecido por App...Servicio de desarrollo de Apps para iPhone, Android y Kindle ofrecido por App...
Servicio de desarrollo de Apps para iPhone, Android y Kindle ofrecido por App...Camilo Saenz
 
ESTRUCTURA DE UN PROYECTO EN ANDROID STUDIO 2.2
ESTRUCTURA DE UN PROYECTO EN ANDROID STUDIO 2.2ESTRUCTURA DE UN PROYECTO EN ANDROID STUDIO 2.2
ESTRUCTURA DE UN PROYECTO EN ANDROID STUDIO 2.2Jacinto Cabrera Rodríguez
 
Desarrollo android - 6 - multimedia
Desarrollo android - 6 - multimediaDesarrollo android - 6 - multimedia
Desarrollo android - 6 - multimediaEmilio Aviles Avila
 
Intro. a Android Instituto Bosc de la Coma en Olot
Intro. a Android Instituto Bosc de la Coma en OlotIntro. a Android Instituto Bosc de la Coma en Olot
Intro. a Android Instituto Bosc de la Coma en Olothojalataverde
 
BDJ Team_Oct2015_pg_BADT
BDJ Team_Oct2015_pg_BADTBDJ Team_Oct2015_pg_BADT
BDJ Team_Oct2015_pg_BADTJulie Bissett
 
Interfaces increibles en Android
Interfaces increibles en AndroidInterfaces increibles en Android
Interfaces increibles en Androidjezabelink
 
Desarrollo en Android: Conceptos Básicos
Desarrollo en Android: Conceptos BásicosDesarrollo en Android: Conceptos Básicos
Desarrollo en Android: Conceptos BásicosGabriel Huecas
 
Sincronización de BD SQLite con MySQL en Android
Sincronización de BD SQLite con MySQL en AndroidSincronización de BD SQLite con MySQL en Android
Sincronización de BD SQLite con MySQL en AndroidMeison Chirinos
 
Education and Management of Diabetics
Education and Management of DiabeticsEducation and Management of Diabetics
Education and Management of DiabeticsDalia A. Hamdy
 

Viewers also liked (20)

Android de la A a la Z Actividades ulises gonzalez
Android de la A a la Z   Actividades ulises gonzalezAndroid de la A a la Z   Actividades ulises gonzalez
Android de la A a la Z Actividades ulises gonzalez
 
Todo trabajo es temporal
Todo trabajo es temporalTodo trabajo es temporal
Todo trabajo es temporal
 
Bloguian
BloguianBloguian
Bloguian
 
Android service
Android serviceAndroid service
Android service
 
Curso Taller Android Procesado Imagen
Curso Taller Android Procesado ImagenCurso Taller Android Procesado Imagen
Curso Taller Android Procesado Imagen
 
operaciones aritméticas usando
operaciones aritméticas  usando operaciones aritméticas  usando
operaciones aritméticas usando
 
Servicio de desarrollo de Apps para iPhone, Android y Kindle ofrecido por App...
Servicio de desarrollo de Apps para iPhone, Android y Kindle ofrecido por App...Servicio de desarrollo de Apps para iPhone, Android y Kindle ofrecido por App...
Servicio de desarrollo de Apps para iPhone, Android y Kindle ofrecido por App...
 
Android: Interfaz de Usuario
Android: Interfaz de UsuarioAndroid: Interfaz de Usuario
Android: Interfaz de Usuario
 
ESTRUCTURA DE UN PROYECTO EN ANDROID STUDIO 2.2
ESTRUCTURA DE UN PROYECTO EN ANDROID STUDIO 2.2ESTRUCTURA DE UN PROYECTO EN ANDROID STUDIO 2.2
ESTRUCTURA DE UN PROYECTO EN ANDROID STUDIO 2.2
 
Desarrollo android - 6 - multimedia
Desarrollo android - 6 - multimediaDesarrollo android - 6 - multimedia
Desarrollo android - 6 - multimedia
 
Hola mundo
Hola mundoHola mundo
Hola mundo
 
Intro. a Android Instituto Bosc de la Coma en Olot
Intro. a Android Instituto Bosc de la Coma en OlotIntro. a Android Instituto Bosc de la Coma en Olot
Intro. a Android Instituto Bosc de la Coma en Olot
 
BDJ Team_Oct2015_pg_BADT
BDJ Team_Oct2015_pg_BADTBDJ Team_Oct2015_pg_BADT
BDJ Team_Oct2015_pg_BADT
 
Er. Anand Resume
Er. Anand ResumeEr. Anand Resume
Er. Anand Resume
 
Interfaces increibles en Android
Interfaces increibles en AndroidInterfaces increibles en Android
Interfaces increibles en Android
 
Desarrollo en Android: Conceptos Básicos
Desarrollo en Android: Conceptos BásicosDesarrollo en Android: Conceptos Básicos
Desarrollo en Android: Conceptos Básicos
 
Game store app(2)
Game store app(2)Game store app(2)
Game store app(2)
 
Sincronización de BD SQLite con MySQL en Android
Sincronización de BD SQLite con MySQL en AndroidSincronización de BD SQLite con MySQL en Android
Sincronización de BD SQLite con MySQL en Android
 
Education and Management of Diabetics
Education and Management of DiabeticsEducation and Management of Diabetics
Education and Management of Diabetics
 
Iniciación a Android
Iniciación a AndroidIniciación a Android
Iniciación a Android
 

Similar to Android de la A a la Z XML Ulises Gonzalez (20)

Unit3wt
Unit3wtUnit3wt
Unit3wt
 
XML notes.pptx
XML notes.pptxXML notes.pptx
XML notes.pptx
 
Xmll
XmllXmll
Xmll
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5   XMLM.FLORENCE DAYANA WEB DESIGN -Unit 5   XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
 
PHP XML
PHP XMLPHP XML
PHP XML
 
eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)
 
XML.pptx
XML.pptxXML.pptx
XML.pptx
 
Xml
XmlXml
Xml
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
 
Xml
XmlXml
Xml
 
Xml 1
Xml 1Xml 1
Xml 1
 
Xsd
XsdXsd
Xsd
 
Xsd
XsdXsd
Xsd
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
XML
XMLXML
XML
 
Ch2 neworder
Ch2 neworderCh2 neworder
Ch2 neworder
 
23xml
23xml23xml
23xml
 

More from Android UNAM

Móviles, fuerza de cambio
Móviles, fuerza de cambioMóviles, fuerza de cambio
Móviles, fuerza de cambioAndroid UNAM
 
Android de la A a la Z PARTE 3 de 3 ulises gonzalez
Android de la A a la Z  PARTE 3 de 3 ulises gonzalezAndroid de la A a la Z  PARTE 3 de 3 ulises gonzalez
Android de la A a la Z PARTE 3 de 3 ulises gonzalezAndroid UNAM
 
Android de la A a la z componentes de una aplicacion ulises gonzalez
Android de la A a la z   componentes de una aplicacion ulises gonzalezAndroid de la A a la z   componentes de una aplicacion ulises gonzalez
Android de la A a la z componentes de una aplicacion ulises gonzalezAndroid UNAM
 
Android de la A a la Z PARTE 2 de 3 ulises gonzalez
Android de la A a la Z  PARTE 2 de 3 ulises gonzalezAndroid de la A a la Z  PARTE 2 de 3 ulises gonzalez
Android de la A a la Z PARTE 2 de 3 ulises gonzalezAndroid UNAM
 
Android de la A a la Z PARTE 1 de 3 ulises gonzalez
Android de la A a la Z PARTE 1 de 3 ulises gonzalezAndroid de la A a la Z PARTE 1 de 3 ulises gonzalez
Android de la A a la Z PARTE 1 de 3 ulises gonzalezAndroid UNAM
 
"Android de la A a la Z" -- Unidad 11
"Android de la A a la Z" -- Unidad 11"Android de la A a la Z" -- Unidad 11
"Android de la A a la Z" -- Unidad 11Android UNAM
 
"Android de la A a la Z" -- Unidad 10
"Android de la A a la Z" -- Unidad 10"Android de la A a la Z" -- Unidad 10
"Android de la A a la Z" -- Unidad 10Android UNAM
 
"Android de la A a la Z" -- Unidad 4
"Android de la A a la Z" -- Unidad 4"Android de la A a la Z" -- Unidad 4
"Android de la A a la Z" -- Unidad 4Android UNAM
 
"Android de la A a la Z" -- Unidad 9
"Android de la A a la Z" -- Unidad 9"Android de la A a la Z" -- Unidad 9
"Android de la A a la Z" -- Unidad 9Android UNAM
 
"Android de la A a la Z" -- Unidad 8
"Android de la A a la Z" -- Unidad 8"Android de la A a la Z" -- Unidad 8
"Android de la A a la Z" -- Unidad 8Android UNAM
 
Android de la A a la Z" -- Unidad 7
Android de la A a la Z" -- Unidad 7Android de la A a la Z" -- Unidad 7
Android de la A a la Z" -- Unidad 7Android UNAM
 
"Android de la A a la Z" -- Unidad 6
"Android de la A a la Z" -- Unidad 6"Android de la A a la Z" -- Unidad 6
"Android de la A a la Z" -- Unidad 6Android UNAM
 
"Android de la A a la Z" -- Unidad 5
"Android de la A a la Z" -- Unidad 5"Android de la A a la Z" -- Unidad 5
"Android de la A a la Z" -- Unidad 5Android UNAM
 
"Android de la A a la Z" -- Unidad 3
"Android de la A a la Z" -- Unidad 3"Android de la A a la Z" -- Unidad 3
"Android de la A a la Z" -- Unidad 3Android UNAM
 
"Android de la A a la Z" -- Unidad 2
"Android de la A a la Z" -- Unidad 2"Android de la A a la Z" -- Unidad 2
"Android de la A a la Z" -- Unidad 2Android UNAM
 
"Android de la A a la Z" -- Unidad 1
"Android de la A a la Z" -- Unidad 1"Android de la A a la Z" -- Unidad 1
"Android de la A a la Z" -- Unidad 1Android UNAM
 
"Android de la A a la Z" -- Introducción
"Android de la A a la Z" -- Introducción"Android de la A a la Z" -- Introducción
"Android de la A a la Z" -- IntroducciónAndroid UNAM
 

More from Android UNAM (17)

Móviles, fuerza de cambio
Móviles, fuerza de cambioMóviles, fuerza de cambio
Móviles, fuerza de cambio
 
Android de la A a la Z PARTE 3 de 3 ulises gonzalez
Android de la A a la Z  PARTE 3 de 3 ulises gonzalezAndroid de la A a la Z  PARTE 3 de 3 ulises gonzalez
Android de la A a la Z PARTE 3 de 3 ulises gonzalez
 
Android de la A a la z componentes de una aplicacion ulises gonzalez
Android de la A a la z   componentes de una aplicacion ulises gonzalezAndroid de la A a la z   componentes de una aplicacion ulises gonzalez
Android de la A a la z componentes de una aplicacion ulises gonzalez
 
Android de la A a la Z PARTE 2 de 3 ulises gonzalez
Android de la A a la Z  PARTE 2 de 3 ulises gonzalezAndroid de la A a la Z  PARTE 2 de 3 ulises gonzalez
Android de la A a la Z PARTE 2 de 3 ulises gonzalez
 
Android de la A a la Z PARTE 1 de 3 ulises gonzalez
Android de la A a la Z PARTE 1 de 3 ulises gonzalezAndroid de la A a la Z PARTE 1 de 3 ulises gonzalez
Android de la A a la Z PARTE 1 de 3 ulises gonzalez
 
"Android de la A a la Z" -- Unidad 11
"Android de la A a la Z" -- Unidad 11"Android de la A a la Z" -- Unidad 11
"Android de la A a la Z" -- Unidad 11
 
"Android de la A a la Z" -- Unidad 10
"Android de la A a la Z" -- Unidad 10"Android de la A a la Z" -- Unidad 10
"Android de la A a la Z" -- Unidad 10
 
"Android de la A a la Z" -- Unidad 4
"Android de la A a la Z" -- Unidad 4"Android de la A a la Z" -- Unidad 4
"Android de la A a la Z" -- Unidad 4
 
"Android de la A a la Z" -- Unidad 9
"Android de la A a la Z" -- Unidad 9"Android de la A a la Z" -- Unidad 9
"Android de la A a la Z" -- Unidad 9
 
"Android de la A a la Z" -- Unidad 8
"Android de la A a la Z" -- Unidad 8"Android de la A a la Z" -- Unidad 8
"Android de la A a la Z" -- Unidad 8
 
Android de la A a la Z" -- Unidad 7
Android de la A a la Z" -- Unidad 7Android de la A a la Z" -- Unidad 7
Android de la A a la Z" -- Unidad 7
 
"Android de la A a la Z" -- Unidad 6
"Android de la A a la Z" -- Unidad 6"Android de la A a la Z" -- Unidad 6
"Android de la A a la Z" -- Unidad 6
 
"Android de la A a la Z" -- Unidad 5
"Android de la A a la Z" -- Unidad 5"Android de la A a la Z" -- Unidad 5
"Android de la A a la Z" -- Unidad 5
 
"Android de la A a la Z" -- Unidad 3
"Android de la A a la Z" -- Unidad 3"Android de la A a la Z" -- Unidad 3
"Android de la A a la Z" -- Unidad 3
 
"Android de la A a la Z" -- Unidad 2
"Android de la A a la Z" -- Unidad 2"Android de la A a la Z" -- Unidad 2
"Android de la A a la Z" -- Unidad 2
 
"Android de la A a la Z" -- Unidad 1
"Android de la A a la Z" -- Unidad 1"Android de la A a la Z" -- Unidad 1
"Android de la A a la Z" -- Unidad 1
 
"Android de la A a la Z" -- Introducción
"Android de la A a la Z" -- Introducción"Android de la A a la Z" -- Introducción
"Android de la A a la Z" -- Introducción
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Android de la A a la Z XML Ulises Gonzalez

  • 1. XML Características •Transmite contenido y estructura. •No transmite presentación ni comportamiento. Para que lo haga se le debe asociar mecanismos adicionales. •XML para la comunicación entre aplicaciones: representación de los datos muy simple, fácil de transmitir por la red, estándar. En los últimos tiempos este uso se está haciendo muy popular con el surgimiento de los Servicios web. 1
  • 2. •Que fuera idéntico a la hora de servir, recibir, y procesar la información del HTML para aprovechar toda la tecnología implantada de este. •Que fuera normal y conciso desde el punto de vista de los datos y la manera de guardarlos. •Que fuera extensible, para que lo puedan utilizar en todos los campos del conocimiento. •Que fuese fácil de leer y editar. •Que fuese fácil de implantar, programar y aplicar a los distintos sistemas 2
  • 3. Example: A Simple XML Page <?xml version="1.0"?> <employees> <employee> <employee_id>120</employee_id> <last_name>Weiss</last_name> <salary>8000</salary> </employee> <employee> <employee_id>121</employee_id> <last_name>Fripp</last_name> <salary>8200</salary> </employee> </employees> 3
  • 4. XML Document Structure • An XML document contains the following parts: 1. Prologue 2. Root element 3. Epilogue <?xml version="1.0" encoding="WINDOWS-1252"?> 1 <!–- this is a comment --> <employees> ... 2 </employees> <?gifPlayer size="100,300" ?> 3 4
  • 5. The XML Declaration • XML documents must start with an XML declaration. • The XML declaration: – <?xml version="1.0" encoding="WINDOWS-1252"?> xml Looks like a processing instruction with the <document-root> name. For example: ... </document-root> – Must contain the version attribute – May (optionally) include: • The encoding attribute • The standalone attribute – Is optional in XML 1.0, but mandatory in XML 1.1 5
  • 6. Components of an XML Document • XML documents comprise storage units containing: – Parsed data, including the: • Markup (elements, attributes, entities) used to describe the data they contain • Character data described by markup <?xml version="1.0" encoding="WINDOWS-1252"?> <employees> <employee id="100"> <name>Rachael O&apos;Leary</name> </employee> </employees> <![CDATA[ ...unparsed data... ]]> – Unparsed data, textual or binary information (graphic and sound data) taken as entered 6
  • 7. XML Elements – An XML element: • Has a start tag, end tag, and optional data content • Tag names are case-sensitive (must be identical) Tag name <employee> Start tag Data Element <name>Steven King</name> content </employee> End tag Tag name – Empty elements: • Do not contain any data <initials></initials> • May appear as a single tag 7
  • 8. XML Attributes • An XML attribute is a name-value pair that: – Is specified in the start tag, after the tag name <?xml version="1.0" encoding="WINDOWS-1252"?> <employees> <employee id="100" name='Rachael O&apos;Leary'> <salary>1000</salary> </employee> </employees> – Has a case-sensitive name – Has a case-sensitive value that must be enclosed in matching single or double quotes – Provides additional information about the XML document or XML elements 8
  • 9. Using Elements Versus Attributes <?xml version="1.0"?> <employees> 1 Elements <employee> <id>100</id> <last_name>King</last_name> <salary>24000</salary> </employee> </employees> <?xml version="1.0"?> <employees> 2 Attributes <employee id="100" last_name="King" salary="24000"> <job>President</job> </employee> </employees> 9
  • 10. XML Entities • An XML entity: – Is a unit of data storage – Is identified by a case-sensitive name – Is used as replacement text (substituted) when referencing its name between an ampersand (&), and a semicolon (;) <comment>Salaries must not be &lt; 1000</comment> – Has predefined names for special XML characters: • &lt; for less than (<), and &gt; for greater than (>) • &amp; for ampersand (&) • &quot; for double quote (") • &apos; for single quote (') 10
  • 11. XML Comments • XML comments: – Start with <!-- – End with --> – May appear anywhere in the character data of a document, and before the root element – Are not elements, and can occupy multiple lines – May not appear inside a tag or another comment <?xml version="1.0" encoding="WINDOWS-1252"?> <!–- Comment: This document has information about employees in the company --> <employees> <name>Steven King</name> <!-- Full name --> </employees> 11
  • 12. Class Activity • Identify errors in the following examples: <?xml version="1.0"?> <Question>Is this legal?</Question> 1 <Answer>No</Answer> <!-- An XML document --> <?xml version="1.0"?> 2 <Question 4You="Is this attribute name correct"/> 3 <EMAIL ID=Mark.Ant@oracle.com></EMAIL> 4 <Question>Is this legal</question> 5 12
  • 13. Class Activity 1. Both <Question> and <Answer> are top-level elements. You can have only one document element per document. 2. In general, you cannot have a comment before the XML declaration, and the root element is required. Note: Internet Explorer allows a comment before the XML declaration. 3. The attribute name cannot start with a digit. 4. The attribute value is not enclosed in quotes. 5. Opening and closing tag names are case-sensitive and must match. 13