100 likes | 205 Vues
This introduction to XML explains its purpose as an extensible markup language designed for structuring and encoding objects based on their content and meaning. It highlights the convergence of document markup, data interchange, and web technologies, addressing the limitations of HTML. The guide covers XML processing, including the use of parsers (DOM and SAX), validation through DTDs and schemas, and XSLT for transformations. It also explores XML's potential for the future, including its applications in web services like SOAP and XML-RPC.
E N D
What Is XML? • Extensible markup language • Encoding objects based on their structure and meaning of content • Convergence of three technologies: • Document markup • Data interchange • World wide web
Why XML? • To address HTML limitations • Enabling technology for a business web • Next generation web
Basic XML Process Content, structure, meaning XML Document End Result Processing Engine What to do with XML Application SpecificationObject
Processing XML • Parsers • Parsers are commodity items • Two basic types: • Tree based (DOM) • Event based (SAX) • Your applications requirements decide which one to use • Validating parsers
XML Validity • Well-formed is not always enough. • Provides higher level conformance. • Include formal definition of data model. • Document type definition (DTD). • Schema. • A DTD defines a document type.
XSL and XSLT • XSL • XSLT – transformation stylesheet • XSL FO – formatting objects • XSLT XML Document HTML Document XSLT Engine XSLT Style sheet
Very Simple Example <xsl:stylesheet version=“1.0”> <xsl:template match=“person”> <html><p> <xsl:apply-templates/> </p></html> </xsl:template> </xsl:stylesheet> <person type=“fictional”> <name> <first>Peter</first> <last>Pan</last> <feature>flies</feature> </person> XSLT Engine <html><p>PeterPanflies</p></html>
XML Future • Http & XML =. • Soap. • XML-RPC. • Can work across firewalls. • Platform independent. • XML enabled data bases. • XML enabled search engines. • Industry standard XML vocabularies.