2. Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
4. 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
5. 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
6. Quick Comparison
HTML XML
uses 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
7. • What is a parser?
– A program that analyses the grammatical structure of an
input, with respect to a given formal grammar
8. • <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
9. 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
10. XML Parser
• We will consider two parsing methods
SAX = Simple API for XML
DOM = Document Object Model
11. SAX
• XML is read sequentially
• When a parsing event happens, the parser invokes the
corresponding method of the corresponding handler
12. 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
13. 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
14. XML Schema Requirements
• Structural
– namespaces
– primitive types & structural schema
integration
– inheritance
Data type
– integers, dates, … (like in languages)
– user-defined (constrain some properties)
16. 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
18. GladeXMLClass
typedef struct
{
GObjectClass parent_class;
/* Virtual function: gets the appropriate gtype for the
typename.*/
GType (* lookup_type) (GladeXML*self, const
char *gtypename);
} GladeXMLClass;
19. 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