XML, JSON and AJAX

XML Fundamentals

XML (Extensible Markup Language) is a flexible way to create common information formats and share both the format and the data on the World Wide Web, intranets, and elsewhere. For example, computer makers might agree on a standard or common way to describe the information about a computer product (processor speed, memory size, and so forth) and then describe the product information format with XML. Such a standard way of describing data would enable a user to send an intelligent agent (a program) to each computer maker's Web site, gather data, and then make a valid comparison. XML can be used by any individual or group of individuals or companies that wants to share information in a consistent way.

XML, a formal recommendation from the World Wide Web Consortium (W3C), is similar to the language of today's Web pages, the Hypertext Markup Language (HTML). Both XML and HTML contain markup symbols to describe the contents of a page or file. HTML, however, describes the content of a Web page (mainly text and graphic images) only in terms of how it is to be displayed and interacted with. For example, the letter "p" placed within markup tags starts a new paragraph. XML describes the content in terms of what data is being described.

XML is "extensible" because, unlike HTML, the markup symbols are unlimited and self-defining. XML is actually a simpler and easier-to-use subset of the Standard Generalized Markup Language (SGML), the standard for how to create a document structure. It is expected that HTML and XML will be used together in many Web applications. XML markup, for example, may appear within an HTML page.

Extensible Markup Language (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 is defined in the XML 1.0 Specification[3] produced by the W3C, and several other related specifications,[4] all free open standards.[5]

The design goals of XML emphasize simplicity, generality, and usability over the Internet.[6] It is a textual data format with strong support via Unicode for the languages of the world. Although the design of XML focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services.
Many application programming interfaces (APIs) have been developed to aid software developers with processing XML data, and several schema systems exist to aid in the definition of XML-based languages.

As of 2009, hundreds of document formats using XML syntax have been developed,[7] including RSS, Atom, SOAP, and XHTML. XML-based formats have become the default for many office-productivity tools, including Microsoft Office (Office Open XML), OpenOffice.org and LibreOffice (OpenDocument), and Apple's iWork. XML has also been employed as the base language for communication protocols, such as XMPP.

 
  
XML Fundamentals Course Overview
























































Following Examples





























































































































































What is XML





























































































XML Data Model






























Interface Definition language is base for most of XML and HTML APIs










































































































Here XSL is sometimes called as XSL:FORMATTING













































































XML Structure






























































































Parsed Entity







UnParsed Entity


















































Firefox rendering logic structure of the XML document

















































































Content and Markup















































































































































Element Normal Form








Attribute Normal Form










































Element Declarations
























































































































































Attribute Declarations



































































































































































Parameter Entities
















































Namespaces in XML






































































































































































































































Languages and XML












































































































Whitespace, Comments and Processing Instructions








































































































































XML tools by Example





XLinq Example















XLinq with XML














XLinq with XML Namespace operation



















XLinq Extension method















Defensive XLinq Query with XML Namespace
















XPath



XPath is used to navigate through elements and attributes in an XML document.  XPath is a major element in W3C's XSLT standard - and XQuery and XPointer are both built on XPath expressions. 
XPath is a language for finding information in an XML document.
















































































For more information please visit below site
http://www.w3schools.com/xpath/default.asp




XSL-FO




XSL-FO is about formatting XML data for output.  Styling is both about transforming and formatting information. When the World Wide Web Consortium (W3C) made their first XSL Working Draft, it contained the language syntax for both transforming and formatting XML documents.

Later, the Working Group at W3C split the original draft into separate Recommendations:
  • XSLT, a language for transforming XML documents
  • XSL or XSL-FO, a language for formatting XML documents
  • XPath, a language for navigating in XML documents



Example:

<?xml version="1.0" encoding="ISO-8859-1"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>
  <fo:simple-page-master master-name="A4">
    <!-- Page template goes here -->
  </fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="A4">
  <!-- Page content goes here -->
</fo:page-sequence>

</fo:root>


For more information please visit below site
http://www.w3schools.com/xslfo/default.asp






XQuery



XQuery is to XML what SQL is to database tables.  XQuery is designed to query XML data - not just XML files, but anything that can appear as XML, including databases.









XQuery Example


We will use the following XML document in the examples below.


<?xml version="1.0" encoding="ISO-8859-1"?>

<bookstore>

<book category="COOKING">
  <title lang="en">Everyday Italian</title>
  <author>Giada De Laurentiis</author>
  <year>2005</year>
  <price>30.00</price>
</book>

<book category="CHILDREN">
  <title lang="en">Harry Potter</title>
  <author>J K. Rowling</author>
  <year>2005</year>
  <price>29.99</price>
</book>

<book category="WEB">
  <title lang="en">XQuery Kick Start</title>
  <author>James McGovern</author>
  <author>Per Bothner</author>
  <author>Kurt Cagle</author>
  <author>James Linn</author>
  <author>Vaidyanathan Nagarajan</author>
  <year>2003</year>
  <price>49.99</price>
</book>

<book category="WEB">
  <title lang="en">Learning XML</title>
  <author>Erik T. Ray</author>
  <year>2003</year>
  <price>39.95</price>
</book>

</bookstore>

















For more information please visit below site
http://www.w3schools.com/xquery/default.asp






XLink and XPointer



XLink defines a standard way of creating hyperlinks in XML documents.  XPointer allows the hyperlinks to point to more specific parts in the XML document.














For more information please visit below site
http://www.w3schools.com/xlink/default.asp



XML Schema



An XML Schema describes the structure of an XML document.  XML Schema is an XML-based alternative to DTD.






For more information please visit below site
http://www.w3schools.com/schema/default.asp







XML DOM



The XML DOM defines a standard way for accessing and manipulating XML documents.  The DOM presents an XML document as a tree-structure.  The XML DOM defines a standard for accessing and manipulating XML.
















XML DOM Parser


Most browsers have a built-in XML parser to read and manipulate XML.  The parser converts XML into a JavaScript accessible object (the XML DOM).


















For more information please visit below site
http://www.w3schools.com/dom/default.asp




XSLT


XSLT debugging in Visual Studio



XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents.
XSLT stands for XSL Transformations.


Example



















XSLT debugging in Visual Studio






































































Debugging facility in VS




















For more information please visit below site
http://www.w3schools.com/xsl/default.asp







JSON - Java Script Object Notation

 

JSON: JavaScript Object Notation.  JSON is syntax for storing and exchanging text information. Much like XML.  JSON is smaller than XML, and faster and easier to parse.

 

 

 

 

 

 

 

 

 

 

Please tap on below link for more info.

 http://www.w3schools.com/json/default.asp

 

 

 

 AJAX

 

Classic AJAX Call from JS 

AJAX = Asynchronous JavaScript and XML.  AJAX is not a new programming language, but a new way to use existing standards.  AJAX is the art of exchanging data with a server, and updating parts of a web page - without reloading the whole page.




 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 AJAX in JQuery

 

 

 

 

 

 

 Old way of handling AJAX request

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

JQuery Source code for AJAX Get Method

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   

 

ASP.NET Ajax Fundamentals

 

ASP.NET Ajax Introduction

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  Demo of Raw AJAX

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 ASP.NET Ajax Server Controls

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 Server side Conditional Updates with Script manager

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 Optimizing Partial Updates

 

Conditional UI updates:

 

  Conditional SQL calling

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Demo of Triggers

 

 

 

 

 

 

  Nesting Update panels

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  Demo of PageRequestManager of Client side AJAX

 

 

 

 

 

 

 

 

 

 
 Demo to cancel the AJAX request

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  Demo of Update progress

 

 

 

 

 

 

 

 

 

 

 

















Demo of Timer control in AJAX
























Demo of Exception handling in AJAX





























































































ASP.NET Ajax Server Data











Demo of Script Callable WCF services















































































































































We can place Contract and Service code at single file with help of New Factory class of ASP.NET AJAX


















































































Demo of JSON Serialization 















































































Demo of Page Method in AJAX call in ASP.NET




































































ASP.NET Ajax Control Toolkit






















































Demo of AJAX Control Tool kit





















































Demo of Autocomplete extender on Textbox



































Demo of Modal Popup window












































Demo of Update panel Animation









































































 

No comments:

Post a Comment