Published on


Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Disclaimer: This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocument of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .Ltd
  2. 2. XML
  3. 3. XML?• eXtensible Markup Language• A meta language that allows you to create and format your own document markups• A method for putting structured data into a text file; these files are - easy to read - unambiguous - extensible - platform-independent
  4. 4. xml• Important because it removes two constraints which were holding back Web developments: 1. dependence on a single, inflexible document type (HTML); 2. the complexity of full SGML, whose syntax allows many powerful but hard-to-program options
  5. 5. Quick Comparison HTML XMLuses tags and attributes uses tags and attributes- content and formatting can be - content and format are placed together separate; formatting is contained in a stylesheet - allows user to specify what <p><font=”Arial”>text</fo each tag and attribute means nt>- tags and attributes are pre- determined and rigid
  6. 6. • What is a parser? – A program that analyses the grammatical structure of an input, with respect to a given formal grammar
  7. 7. • <article> <author>Gerhard Weikum</author> <title>The Web in 10 Years</title> </article> Easy to understand for human users Very expressive (semantics along with the data) Well structured, easy to read and write from programs
  8. 8. What is a XML Parser?• It is a software library (or a package) that provides methods (or interfaces) for client applications to work with XML documents• It checks the well-formattedness• It may validate the documents• It does a lot of other detailed things so that a client is shielded from that complexities
  9. 9. XML Parser• We will consider two parsing methods SAX = Simple API for XML DOM = Document Object Model
  10. 10. SAX• XML is read sequentially• When a parsing event happens, the parser invokes the corresponding method of the corresponding handler
  11. 11. DOM• Parser creates a tree object out of the document• User accesses data by traversing the tree – The tree and its traversal conform to a W3C standard• The API allows for constructing, accessing and manipulating the structure and content of XML documents
  12. 12. XML Schemas• “Schemas” is a general term--DTDs are a form of XMLschemas – According to the dictionary, a schema is “a structured framework or plan”• When we say “XML Schemas,” we usually mean the W3C XML Schema Language – This is also known as “XML Schema Definition” language, or XSD
  13. 13. XML Schema Requirements• Structural – namespaces – primitive types & structural schema integration – inheritanceData type – integers, dates, … (like in languages) – user-defined (constrain some properties)
  14. 14. XML Schema Requirements• Conformance – processors, validityExample:
  15. 15. Glade XML Structure• The GladeXML object then provides an interface for accessing the widgets in the interface by the names assigned to them inside the XML description.• Object Hierarchy GObject +---- GladeXML
  16. 16. Glade XML Structuretypedef struct {GObject parent;char *filename; }GladeXML;
  17. 17. GladeXMLClasstypedef struct { GObjectClass parent_class; /* Virtual function: gets the appropriate gtype for the typename.*/ GType (* lookup_type) (GladeXML*self, constchar *gtypename); } GladeXMLClass;
  18. 18. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance.www.baabtra.com | www.massbaab.com |www.baabte.com
  19. 19. Contact Us