XML and JSON 1. XML, a very brief introduction XML = eXtensible Markup Language Language to describe data to be exchanged on the web And many other things.

Slides:



Advertisements
Similar presentations
XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
Advertisements

CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
XML Primer. 2 History: SGML vs. HTML vs. XML SGML (1960) XML(1996) HTML(1990) XHTML(2000)
Introduction to XML Rashmi Kukanur. XML XML stands for Extensible Markup Language XML was designed to carry data XML and HTML designed with different.
XML Schema Describing the structure of XML documents. A very brief introduction 1XML Schema.
Jennifer Widom XML Data DTDs, IDs & IDREFs. Jennifer Widom DTDs, IDs & IDREFs “Well-Formed” XML Adheres to basic structural requirements Single root element.
1 Advanced Topics XML and Databases. 2 XML u Overview u Structure of XML Data –XML Document Type Definition DTD –Namespaces –XML Schema u Query and Transformation.
Manohar – Why XML is Required Problem: We want to save the data and retrieve it further or to transfer over the network. This.
4/20/2017.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
 Introduction to XML Introduction to XML  Features of XML Features of XML  Syntax of XML Syntax of XML  Syntax rules of XML document Syntax rules.
XML, CFMX CFML & SQL XML Kevin Penny, MMCP
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
XML: Overview MIS 181.9: Service Oriented Architecture 2 nd Semester,
XML eXtensible Markup Language w3c standard Why? Store and transport data Easy data exchange Create more languages WSDL (Web Service Description Language)
Introduction to XML Eugenia Fernandez IUPUI. What is XML? From the World Wide Web Consortium (W3C) The Extensible Markup Language (XML) is the universal.
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
Session IV Chapter 9 – XML Schemas
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
1 Using XML. 2 The Ticket Booth System We need a way to retain information between program runs. In real life, we would probably use a database system.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
XML Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
Jeff Ullman: Introduction to XML 1 XML Semistructured Data Extensible Markup Language Document Type Definitions.
Lecture 20 XML. 2 Objectives What semistructured data is. Concepts of the Object Exchange Model (OEM), a model for semistructured data. Basics of Lore,
XML – A Quick Introduction Kerry Raymond (stolen from others)
XML Basics A brief introduction to XML in general 1XML Basics.
Jennifer Widom XML Data Introduction, Well-formed XML.
The Semistructured-Data Model Programming Languages for XML Spring 2011 Instructor: Hassan Khosravi.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
Information Design Trends Unit 4: Sources and Standards Lecture 3: A Brief Introduction to XML.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
Representing data with XML SE-2030 Dr. Mark L. Hornick 1.
HTML A brief introduction HTML1. HTML, what is? HTML is a markup language for describing web documents (web pages). HTML stands for Hyper Text Markup.
Martin Kruliš by Martin Kruliš (v1.1)1.
Jennifer Widom JSON Data Introduction. Jennifer Widom JSON Introduction JavaScript Object Notation (JSON)  Standard for “serializing” data objects, usually.
Dave Salinas. What is XML? XML stands for eXtensible Markup Language Markup language, like HTML HTML was designed to display data, whereas XML was designed.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
SEMI-STRUCTURED DATA (XML) 1. SEMI-STRUCTURED DATA ER, Relational, ODL data models are all based on schema Structure of data is rigid and known is advance.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
Using XML. The Ticket Booth System We need a way to retain information between program runs. In real life, we would probably use a database system for.
XML & JSON. Background XML and JSON are to standard, textual data formats for representing arbitrary data – XML stands for “eXtensible Markup Language”
Advanced Accounting Information Systems Day 28 Introduction to XBRL October 30, 2009.
XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006.
Spring 2013 Markup – Validate – Transform Introduction to Digital Text and XML Rice University, April.
XML intro. What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
Metadata Michael J. Watts
Unit 4 Representing Web Data: XML
XML in Web Technologies
Chapter 7 Representing Web Data: XML
HTML A brief introduction HTML.
XML Data Introduction, Well-formed XML.
XML Data DTDs, IDs & IDREFs.
XML.
Semi-Structured data (XML Data MODEL)
JSON Data Demo.
CS 240 – Advanced Programming Concepts
Presentation transcript:

XML and JSON 1

XML, a very brief introduction XML = eXtensible Markup Language Language to describe data to be exchanged on the web And many other things Program exchange XML documents XML documents are processed by programs Mark up language XML tags structure information Element …. An element may have many sub-elements Nested elements An element has exactly 1 super-element Except the root element, which has 0 super- elements Example XML document Anders Roskilde Michael Valby XML and JSON2

Structure in XML documents Well-formed All start-tags must have a matching end-tag … Tags must be properly nested … Only 1 outer tag Called the root element Valid Well-formed Conforms to an XML schema A set of “grammar rules” Specifies which tags are allowed, etc. XML and JSON3

XML serialization A C# object can be serialized into an XML document. The state of the object is made into an XML document Class XmlSerializer Example: XmlSerialization An XML object can be de-serialized into a C# object Create new object using default constructor Use set part of properties to set the state of the object Example: XmlSerialization XML and JSON4

XPath XPath is a language for finding information in an XML document. With Xpath you can extract the information you need from an XML document Examples xpathExamples, using class XmlDocument XML and JSON5

JSON JSON = JavaScript Object Notation Language for storing and exchanging data Structure { object } “name” : “value” “name” : [“value1”, “value2”] Examples XML and JSON6

XML serialization A C# object can be serialized into a JSON string The state on the object is serialized A JSON string can be de-serialized into a C# object Create new object using default constructor Use set part of properties to set the state of the object API C# has some … Most C# programmers use JSON.NET from NewtonSoft NuGet this package into your Visual Studio solution Examples jsonSerialization XML and JSON7

XML vs. JSON JSON is simpler than XML JSON string are shorter than XML documents Use less disk / network bandwidth XML came first, then JSON XML and JSON8