SlideShare una empresa de Scribd logo
1 de 19
XML &
  web
services




           Ayush Agrawal
           B.E.
           Fourth Semester
           C.S.E. A
EXTENSIBLE MARKUP LANGUAGE

store and organize just about any kind of information


An open standard

Unicode as its standard character set , so supports in writing any
type of script and symbol

clear, simple syntax and unambiguous structure

Can be combined with stylesheets to create formatted documents
What Is XML?

XML is a protocol for containing and managing information.


Family of technologies that can do everything from formatting
documents to filtering data.


Necessary foundation for the next level


Satellite technologies such as stylesheets, transformations,
and do-it-yourself markup languages.
FACTS


    • Xml is different from Html.
1

    • In Xml we can create our own
2     tags .

    • It is a W3C recommendation.
3
Can create new internet languages
XML TREE

XML documents must contain a root element. This element is "the parent" of all
other elements.The elements in an XML document form a document tree.
The tree starts at the root and branches to the lowest level of the tree.



A general view
SYNTAX AND RULES


ALL ELEMENTS MUST HAVE CLOSING TAGS.

ALL TAGS ARE CASE SENSITIVE.



               ELEMENTS MUST BE PROPERLY NESTED.


                ATTRIBUTE VALUES MUST BE QUOTED.




                                ENTITY REFRENCES SHOULD BE USED.


                      WHITE SPACES IN A DOCUMENT ARE NOT TRUNCATED.
XML ELEMENTS

                                                    An element can contain:
 An XML element is everything from                  1.other elements
 (including) the element's start tag to             2.text
 (including) the element's end tag.                 3.attributes
                                                    or a mix of all of the above...


XML elements must follow these naming rules:
1.Names can contain letters, numbers, and other characters
2.Names cannot start with a number or punctuation character
3.Names cannot start with the letters xml (or XML, or Xml, etc)
4.Names cannot contain spaces




                      XML elements can be extended to carry more information.
XML VALIDATION AND VALIDATOR

A "Valid" XML document is a "Well Formed" XML document, which also
      conforms to the rules of a Document Type Definition (DTD)

           <?xml version="1.0" encoding="ISO-8859-1"?>
           <!DOCTYPE note SYSTEM "Note.dtd">

 The purpose of a DTD is to define the structure of an XML document

The W3C XML specification states that a program should stop processing
               an XML document if it finds an error

    To validate xml files we can use various validators because
                  with xml errors are not allowed
VIEWING XML FILES

  Raw XML files can be viewed in all major browsers.

  Don't expect XML files to be displayed as HTML pages.


  The XML document will be displayed with color-coded root and child elements


  A plus (+) or minus sign (-) to the left of the elements can be clicked to expand
  or collapse the element structure


  To view the raw XML source (without the + and - signs), select
   "View Page Source" or "View Source" from the browser menu.
WE CAN LINK XML FILE WITH A CSS FILE TO ADD DISPLAY INFORMATION TO A XML FILE

         INCUDE JUST A LINE:
         <?xml-stylesheet type="text/css" href=“filename.css"?>


     WE CAN EVEN USE XSLT TO PLAY WITH THE DISPLAY OF A XML FLE

XSLT (eXtensible Stylesheet Language Transformations) IS THE RECOMMENDED
                      STYLE SHEET LNGAGE FOR XML FILE

 Different browsers may produce different result when transforming XML
 with XSLT. To reduce this problem the XSLT transformation can be done on
                                 the server.
NAMESPACES
                         Namespaces provide a method to avoid element name conflicts.

  In XML, element names are defined by the developer.This often results
  in a conflict when trying to mix XML documents from different XML applications.

         <table>                                Name conflicts in XML can easily be
          <tr>                                  avoided using a name prefix.
           <td>Apples</td>
           <td>Bananas</td>                        <h:table>
          </tr>                                     <h:tr>
         </table>                                    <h:td>Apples</h:td>
                                                     <h:td>Bananas</h:td>
 <table>                                            </h:tr>
  <name>African Coffee Table</name>                </h:table>
  <width>80</width>
  <length>120</length>                             <f:table>
 </table>                                           <f:name>African Coffee Table</f:name>
                                                    <f:width>80</f:width>
The namespace is defined by the                     <f:length>120</f:length>
xmlns attribute in the start tag of an             </f:table>
element.The namespace declaration
has the following syntax. xmlns:prefix="URI".
XML AND JAVASCRIPT
XML PARSER

       An XML parser converts an XML document into an XML DOM object –
       which can then be manipulated with JavaScript.

XML DOM

       A DOM (Document Object Model) defines a standard way for accessing
       and manipulating documents.

      The XML DOM defines the objects and properties of all XML elements,
      and the methods (interface) to access them

       XML DOM is nothing but javascript accessible object.
Web services


• The basic standards for web services are:

• XML (Extensible Markup Language)

• SOAP (simple object access protocol)

• WSDL (web services description language)

• UDDI (universal description, discovery and integration)
• Web Services involve three major roles
     – Service Provider
     – Service Registry
     – Service Consumer
 • Three major operations surround web services
     – Publishing – making a service available
     – Finding – locating web services
     – Binding – using web services

Because web services deals with inter-organisation communication
these must be universal standards.
SOAP
• Actually used to communicate with the Web Service

• Both the request and the response are SOAP messages

• The body of the message (whose grammar is defined by the
  WSDL) is contained within a SOAP “envelope”

• “Binds” the client to the web service
WSDL

• Describes the Web Service and defines the
  functions that are exposed in the Web Service

• Defines the XML grammar to be used in the
  messages
  – Uses the W3C Schema language
UDDI

• UDDI is used to register and look up services with a central
  registry

• Service Providers can publish information about their business
  and the services that they offer

• Service consumers can look up services that are available by
       • Business
       • Service category
       • Specific service
Xml andweb services

Más contenido relacionado

La actualidad más candente (20)

Xml schema
Xml schemaXml schema
Xml schema
 
Xsd examples
Xsd examplesXsd examples
Xsd examples
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
 
Xml
Xml Xml
Xml
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
XML Schema
XML SchemaXML Schema
XML Schema
 
03 namespace
03 namespace03 namespace
03 namespace
 
XML
XMLXML
XML
 
Web programming xml
Web programming  xmlWeb programming  xml
Web programming xml
 
XSD
XSDXSD
XSD
 
Introduction to XSLT
Introduction to XSLTIntroduction to XSLT
Introduction to XSLT
 
Xml basics
Xml basicsXml basics
Xml basics
 
XML Schema
XML SchemaXML Schema
XML Schema
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
 
Xml basics for beginning
Xml basics for beginningXml basics for beginning
Xml basics for beginning
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml
Xml Xml
Xml
 
XML Technologies
XML TechnologiesXML Technologies
XML Technologies
 
XML Schemas
XML SchemasXML Schemas
XML Schemas
 

Similar a Xml andweb services (20)

Xml
XmlXml
Xml
 
1 xml fundamentals
1 xml fundamentals1 xml fundamentals
1 xml fundamentals
 
xml.pptx
xml.pptxxml.pptx
xml.pptx
 
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)
 
WEB PROGRAMMING
WEB PROGRAMMINGWEB PROGRAMMING
WEB PROGRAMMING
 
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
 
Xml
XmlXml
Xml
 
Intro to xml
Intro to xmlIntro to xml
Intro to xml
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
Oracle soa xml faq
Oracle soa xml faqOracle soa xml faq
Oracle soa xml faq
 
CTDA Workshop on XML and MODS
CTDA Workshop on XML and MODSCTDA Workshop on XML and MODS
CTDA Workshop on XML and MODS
 
XML1.pptx
XML1.pptxXML1.pptx
XML1.pptx
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
 
Xml iet 2015
Xml iet 2015Xml iet 2015
Xml iet 2015
 
Xml viva questions
Xml viva questionsXml viva questions
Xml viva questions
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
 
paper about xml
paper about xmlpaper about xml
paper about xml
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 
Full xml
Full xmlFull xml
Full xml
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Último (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

Xml andweb services

  • 1. XML & web services Ayush Agrawal B.E. Fourth Semester C.S.E. A
  • 2. EXTENSIBLE MARKUP LANGUAGE store and organize just about any kind of information An open standard Unicode as its standard character set , so supports in writing any type of script and symbol clear, simple syntax and unambiguous structure Can be combined with stylesheets to create formatted documents
  • 3. What Is XML? XML is a protocol for containing and managing information. Family of technologies that can do everything from formatting documents to filtering data. Necessary foundation for the next level Satellite technologies such as stylesheets, transformations, and do-it-yourself markup languages.
  • 4. FACTS • Xml is different from Html. 1 • In Xml we can create our own 2 tags . • It is a W3C recommendation. 3
  • 5. Can create new internet languages
  • 6. XML TREE XML documents must contain a root element. This element is "the parent" of all other elements.The elements in an XML document form a document tree. The tree starts at the root and branches to the lowest level of the tree. A general view
  • 7. SYNTAX AND RULES ALL ELEMENTS MUST HAVE CLOSING TAGS. ALL TAGS ARE CASE SENSITIVE. ELEMENTS MUST BE PROPERLY NESTED. ATTRIBUTE VALUES MUST BE QUOTED. ENTITY REFRENCES SHOULD BE USED. WHITE SPACES IN A DOCUMENT ARE NOT TRUNCATED.
  • 8. XML ELEMENTS An element can contain: An XML element is everything from 1.other elements (including) the element's start tag to 2.text (including) the element's end tag. 3.attributes or a mix of all of the above... XML elements must follow these naming rules: 1.Names can contain letters, numbers, and other characters 2.Names cannot start with a number or punctuation character 3.Names cannot start with the letters xml (or XML, or Xml, etc) 4.Names cannot contain spaces XML elements can be extended to carry more information.
  • 9. XML VALIDATION AND VALIDATOR A "Valid" XML document is a "Well Formed" XML document, which also conforms to the rules of a Document Type Definition (DTD) <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE note SYSTEM "Note.dtd"> The purpose of a DTD is to define the structure of an XML document The W3C XML specification states that a program should stop processing an XML document if it finds an error To validate xml files we can use various validators because with xml errors are not allowed
  • 10. VIEWING XML FILES Raw XML files can be viewed in all major browsers. Don't expect XML files to be displayed as HTML pages. The XML document will be displayed with color-coded root and child elements A plus (+) or minus sign (-) to the left of the elements can be clicked to expand or collapse the element structure To view the raw XML source (without the + and - signs), select "View Page Source" or "View Source" from the browser menu.
  • 11. WE CAN LINK XML FILE WITH A CSS FILE TO ADD DISPLAY INFORMATION TO A XML FILE INCUDE JUST A LINE: <?xml-stylesheet type="text/css" href=“filename.css"?> WE CAN EVEN USE XSLT TO PLAY WITH THE DISPLAY OF A XML FLE XSLT (eXtensible Stylesheet Language Transformations) IS THE RECOMMENDED STYLE SHEET LNGAGE FOR XML FILE Different browsers may produce different result when transforming XML with XSLT. To reduce this problem the XSLT transformation can be done on the server.
  • 12. NAMESPACES Namespaces provide a method to avoid element name conflicts. In XML, element names are defined by the developer.This often results in a conflict when trying to mix XML documents from different XML applications. <table> Name conflicts in XML can easily be <tr> avoided using a name prefix. <td>Apples</td> <td>Bananas</td> <h:table> </tr> <h:tr> </table> <h:td>Apples</h:td> <h:td>Bananas</h:td> <table> </h:tr> <name>African Coffee Table</name> </h:table> <width>80</width> <length>120</length> <f:table> </table> <f:name>African Coffee Table</f:name> <f:width>80</f:width> The namespace is defined by the <f:length>120</f:length> xmlns attribute in the start tag of an </f:table> element.The namespace declaration has the following syntax. xmlns:prefix="URI".
  • 13. XML AND JAVASCRIPT XML PARSER An XML parser converts an XML document into an XML DOM object – which can then be manipulated with JavaScript. XML DOM A DOM (Document Object Model) defines a standard way for accessing and manipulating documents. The XML DOM defines the objects and properties of all XML elements, and the methods (interface) to access them XML DOM is nothing but javascript accessible object.
  • 14. Web services • The basic standards for web services are: • XML (Extensible Markup Language) • SOAP (simple object access protocol) • WSDL (web services description language) • UDDI (universal description, discovery and integration)
  • 15. • Web Services involve three major roles – Service Provider – Service Registry – Service Consumer • Three major operations surround web services – Publishing – making a service available – Finding – locating web services – Binding – using web services Because web services deals with inter-organisation communication these must be universal standards.
  • 16. SOAP • Actually used to communicate with the Web Service • Both the request and the response are SOAP messages • The body of the message (whose grammar is defined by the WSDL) is contained within a SOAP “envelope” • “Binds” the client to the web service
  • 17. WSDL • Describes the Web Service and defines the functions that are exposed in the Web Service • Defines the XML grammar to be used in the messages – Uses the W3C Schema language
  • 18. UDDI • UDDI is used to register and look up services with a central registry • Service Providers can publish information about their business and the services that they offer • Service consumers can look up services that are available by • Business • Service category • Specific service