SlideShare a Scribd company logo
1 of 27
Download to read offline
Professional XML with PHP

        Arne Blankerts <arne@thephp.cc>, TobiasSchlitt <toby@php.net>

                                                   IPC 2009


                                                2009-11-15




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   1 / 26
Outline




 1 Overview
          Welcome
          Overview

 2 XML


 3 XML in PHP


 4 Open part




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   2 / 26
Arne Blankerts




         Arne Blankerts <arne@thephp.cc>
         PHP since 1999 (10 years of PHP!)
         Co-Founder of thePHP.cc
         ballyhoo. werbeagentur.
         Open source addicted
                 Inventor and lead developer of fCMS site
                 system
                 Contributor and translator for the PHP manual




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   3 / 26
Tobias Schlitt



         Tobias Schlitt <toby@php.net>
         PHP since 2001
         Freelancing consultant
         Qualified IT Specialist
         Studying CS at TU Dortmund
         (finishing 2010)
         OSS addicted
                 PHP
                 eZ Components
                 PHPUnit




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   4 / 26
So, what about you?




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   5 / 26
Conferences are about contacts




          That is why both begin with con. . .
          Who are you?
          What is your business?
          What is your intention behind coming to IPC?
          What do you expect from this workshop?




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   6 / 26
What can you expect?




 Workshop                                                XPath
         Introduction to XML                                    Tuesday, 13:45 - 14:45
         Working on XML data with                               XPath in depth
         PHP                                             Validating XML
         Practical tips and tricks                              Tuesday, 15:15 - 16:15
         Interactive: What would you like                       DTD, XML Schema and
         to know?                                               RelaxNG




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP              2009-11-15   7 / 26
Rules for this workshop




         Allways Stick to your place!
         Never ask! Repeat: I will not ask anything!
         We are not here to show you anything useful!
         The only correct solution is told by us!
         Do not give feedback on http://joind.in/1041




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   8 / 26
Rules for this workshop




         Allways Stick to your place!
         Never ask! Repeat: I will not ask anything!
         We are not here to show you anything useful!
         The only correct solution is told by us!
         Do not give feedback on http://joind.in/1041




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   8 / 26
Outline




 1 Overview


 2 XML
          Overview
          Get into code. . .

 3 XML in PHP


 4 Open part




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   9 / 26
What is XML?



          General specification for creating markup languages
          Data exchange between computer systems
                  System independent
                  Human readable
                  Most used on the web
                  Successor of SGML
          W3C recommendation
                  1.0 1998 (last update 2008-11-26)
                  1.1 2004 (last update 2006-08-16)




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   10 / 26
XML languages by example



         XHTML                  XML variant of the popular HTML
                RSS             Really Simply Syndication
                                Provide news / updates / ... of websites
                                Read by special clients
                                Aggregation on portals / planets
               SVG              Scalable Vector Graphics
                                Describe vector graphics in XML
                                Potentially interactive / animated
                                (via ECMAScript)




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP      2009-11-15   11 / 26
Related technologies - Schemas

  Schema
  A schema defines the structure XML instance documents.

  XMLSchema                     Written in XML
                                W3C recommendation
                                Popular
        RelaxNG                 2 syntax variants
                                        XML based
                                        Short plain text based
                                OASIS / ISO standard
                                Popular
              DTD               Plain text
                                W3C recommendation
                                Deprecated


Arne Blankerts, Tobias Schlitt (IPC 2009)     Professional XML with PHP   2009-11-15   12 / 26
Related technologies - Querying




  Query
  A query extracts a sub-set of information from a data source.

            XPath               W3C recommendation
                                Navigation in XML documents
                                more on that later...
          XQuery                Functional programming language
                                Allows complex queries




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   13 / 26
Practical




  Let’s get into the code




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   14 / 26
Outline




 1 Overview


 2 XML


 3 XML in PHP
          DOM
          XMLReader/-Writer

 4 Open part




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   15 / 26
Overview



  XML APIs
  PHP has quite some XML APIs.

          The most important are:
                  DOM
                  XMLReader / XMLWriter
                  SimpleXML
          Deprecated are:
                  DOM XML
                  XML Parser




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   16 / 26
Overview - DOM


          Document Object Model
          Standardized API to access XML tree
                  W3C recommendation
                  Level 1 in 1999
                  Currently: Level 3 (2004)
          Available in many languages
                  C
                  Java
                  Perl
                  Python
                  ...
          Represents XML nodes as objects
          Loads full XML tree into memory



Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   17 / 26
Overview - XMLReader/-Writer




          Popular approach to access XML data
          Similar implementations available in
                  Java
                  C#
          Pull / push based
          Does not load XML fully into memory




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   18 / 26
Overview - SimpleXml




          Very simple access to XML data
          Unique (?) to PHP
          Represents XML structures as objects
          Initial implementation hackish
          Loads full XML tree into memory
          You don’t want to use SimpleXML, seriously!




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   19 / 26
APIs compared

                                            DOM       XMLReader/-Writer     SimpleXML
             Read                                                               •
             Write                                                              ◦
             Manipulate                                             •           •
             Full control                                                        -
             Namespaces                                                         ◦
             XPath                                                 -
             Validate                   DTD                     DTD             -
                                       Schema                  Schema
                                       RelaxNG                 RelaxNG
             Comfort                       •                       ◦
                         Fully supported
                     • Supported but not nice
                     ◦ Poorly supported
                      - Not supported at all



Arne Blankerts, Tobias Schlitt (IPC 2009)       Professional XML with PHP       2009-11-15   20 / 26
Practical




  Let’s get into the code




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   21 / 26
Practical




  Let’s get into the code




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   22 / 26
Outline




 1 Overview


 2 XML


 3 XML in PHP


 4 Open part




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   23 / 26
What would you like to do?




          Discuss a particular problem?
          See a special XML technique in PHP?
          Get to know related techniques?




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   24 / 26
Q/A




          Are there any questions left?
          Please give us some feedback!




Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   25 / 26
The end




          We hope you enjoyed the workshop!
          Slides and material
                  Delivered by Software & Support
                  http://schlitt.info/opensource
                  On Slideshare (http://slideshare.net)
          Contact us:
                  Arne Blankerts <arne@thephp.cc>
                  Tobias Schlitt <toby@php.net>
          Give us feedback on http://joind.in/1041

Arne Blankerts, Tobias Schlitt (IPC 2009)   Professional XML with PHP   2009-11-15   26 / 26

More Related Content

Viewers also liked

Viewers also liked (6)

XML and PHP 5
XML and PHP 5XML and PHP 5
XML and PHP 5
 
Ajax for PHP Developers
Ajax for PHP DevelopersAjax for PHP Developers
Ajax for PHP Developers
 
Ajax and PHP
Ajax and PHPAjax and PHP
Ajax and PHP
 
SQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developersSQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developers
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
 

Similar to Professional XML with PHP

XPath - A practical guide
XPath - A practical guideXPath - A practical guide
XPath - A practical guideTobias Schlitt
 
Validating XML - Avoiding the pain
Validating XML - Avoiding the painValidating XML - Avoiding the pain
Validating XML - Avoiding the painTobias Schlitt
 
A Technical Comparison: ISO/IEC 26300 vs Microsoft Office Open XML
A Technical Comparison: ISO/IEC 26300 vs Microsoft Office Open XML A Technical Comparison: ISO/IEC 26300 vs Microsoft Office Open XML
A Technical Comparison: ISO/IEC 26300 vs Microsoft Office Open XML Alexandro Colorado
 
The XML Forms Architecture
The XML Forms ArchitectureThe XML Forms Architecture
The XML Forms ArchitectureiText Group nv
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSCisco Russia
 
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and Walkthrough
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and WalkthroughFirst Look Webcast: OneCore Storage SDK 3.6 Roll-out and Walkthrough
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and WalkthroughEmulex Corporation
 
Extending XForms with Server-Side Functionality
Extending XForms with Server-Side FunctionalityExtending XForms with Server-Side Functionality
Extending XForms with Server-Side FunctionalityMarkku Laine
 
Catalyst 9.0
Catalyst 9.0Catalyst 9.0
Catalyst 9.0Shamusd
 
IoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukeboxIoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukeboxMickaël Rémond
 
Flink Forward San Francisco 2019: Apache Beam portability in the times of rea...
Flink Forward San Francisco 2019: Apache Beam portability in the times of rea...Flink Forward San Francisco 2019: Apache Beam portability in the times of rea...
Flink Forward San Francisco 2019: Apache Beam portability in the times of rea...Flink Forward
 
xml and xhtml.pptx
xml and xhtml.pptxxml and xhtml.pptx
xml and xhtml.pptxssusere16bd9
 
Tech 802: Data, Databases & XML
Tech 802: Data, Databases & XMLTech 802: Data, Databases & XML
Tech 802: Data, Databases & XMLsomisguided
 
Crawford ubl200212
Crawford ubl200212Crawford ubl200212
Crawford ubl200212kcmani15
 
Turbo TPF Scripting Engine - T2SE for IBM ALCS
Turbo TPF Scripting Engine - T2SE for IBM ALCSTurbo TPF Scripting Engine - T2SE for IBM ALCS
Turbo TPF Scripting Engine - T2SE for IBM ALCSNajmi Mansoor Ahmed
 
Introduction to Apache Beam
Introduction to Apache BeamIntroduction to Apache Beam
Introduction to Apache BeamKnoldus Inc.
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamDataWorks Summit
 
Adobe flex an overview
Adobe flex  an overviewAdobe flex  an overview
Adobe flex an overviewSubin Sugunan
 
IETF building block in the LwM2M Ecosystem (IoT World 2017 Workshop)
IETF building block in the LwM2M Ecosystem (IoT World 2017 Workshop)IETF building block in the LwM2M Ecosystem (IoT World 2017 Workshop)
IETF building block in the LwM2M Ecosystem (IoT World 2017 Workshop)Open Mobile Alliance
 

Similar to Professional XML with PHP (20)

XPath - A practical guide
XPath - A practical guideXPath - A practical guide
XPath - A practical guide
 
Validating XML - Avoiding the pain
Validating XML - Avoiding the painValidating XML - Avoiding the pain
Validating XML - Avoiding the pain
 
A Technical Comparison: ISO/IEC 26300 vs Microsoft Office Open XML
A Technical Comparison: ISO/IEC 26300 vs Microsoft Office Open XML A Technical Comparison: ISO/IEC 26300 vs Microsoft Office Open XML
A Technical Comparison: ISO/IEC 26300 vs Microsoft Office Open XML
 
The XML Forms Architecture
The XML Forms ArchitectureThe XML Forms Architecture
The XML Forms Architecture
 
Programming.language
Programming.languageProgramming.language
Programming.language
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OS
 
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and Walkthrough
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and WalkthroughFirst Look Webcast: OneCore Storage SDK 3.6 Roll-out and Walkthrough
First Look Webcast: OneCore Storage SDK 3.6 Roll-out and Walkthrough
 
Extending XForms with Server-Side Functionality
Extending XForms with Server-Side FunctionalityExtending XForms with Server-Side Functionality
Extending XForms with Server-Side Functionality
 
Catalyst 9.0
Catalyst 9.0Catalyst 9.0
Catalyst 9.0
 
IoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukeboxIoT Studio #1: Protocols introduction and connected jukebox
IoT Studio #1: Protocols introduction and connected jukebox
 
Flink Forward San Francisco 2019: Apache Beam portability in the times of rea...
Flink Forward San Francisco 2019: Apache Beam portability in the times of rea...Flink Forward San Francisco 2019: Apache Beam portability in the times of rea...
Flink Forward San Francisco 2019: Apache Beam portability in the times of rea...
 
xml and xhtml.pptx
xml and xhtml.pptxxml and xhtml.pptx
xml and xhtml.pptx
 
Tech 802: Data, Databases & XML
Tech 802: Data, Databases & XMLTech 802: Data, Databases & XML
Tech 802: Data, Databases & XML
 
Crawford ubl200212
Crawford ubl200212Crawford ubl200212
Crawford ubl200212
 
Turbo TPF Scripting Engine - T2SE for IBM ALCS
Turbo TPF Scripting Engine - T2SE for IBM ALCSTurbo TPF Scripting Engine - T2SE for IBM ALCS
Turbo TPF Scripting Engine - T2SE for IBM ALCS
 
Introduction to Apache Beam
Introduction to Apache BeamIntroduction to Apache Beam
Introduction to Apache Beam
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache Beam
 
Adobe flex an overview
Adobe flex  an overviewAdobe flex  an overview
Adobe flex an overview
 
DhevendranResume
DhevendranResumeDhevendranResume
DhevendranResume
 
IETF building block in the LwM2M Ecosystem (IoT World 2017 Workshop)
IETF building block in the LwM2M Ecosystem (IoT World 2017 Workshop)IETF building block in the LwM2M Ecosystem (IoT World 2017 Workshop)
IETF building block in the LwM2M Ecosystem (IoT World 2017 Workshop)
 

More from Tobias Schlitt

More from Tobias Schlitt (6)

HTML to ODT to XML to PDF to …
HTML to ODT to XML to PDF to …HTML to ODT to XML to PDF to …
HTML to ODT to XML to PDF to …
 
Xdebug
XdebugXdebug
Xdebug
 
Unit-Tests
Unit-TestsUnit-Tests
Unit-Tests
 
Xdebug
XdebugXdebug
Xdebug
 
XML and XPath with PHP
XML and XPath with PHPXML and XPath with PHP
XML and XPath with PHP
 
WebDAV - The good, the bad and the evil
WebDAV - The good, the bad and the evilWebDAV - The good, the bad and the evil
WebDAV - The good, the bad and the evil
 

Recently uploaded

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Recently uploaded (20)

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Professional XML with PHP

  • 1. Professional XML with PHP Arne Blankerts <arne@thephp.cc>, TobiasSchlitt <toby@php.net> IPC 2009 2009-11-15 Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 1 / 26
  • 2. Outline 1 Overview Welcome Overview 2 XML 3 XML in PHP 4 Open part Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 2 / 26
  • 3. Arne Blankerts Arne Blankerts <arne@thephp.cc> PHP since 1999 (10 years of PHP!) Co-Founder of thePHP.cc ballyhoo. werbeagentur. Open source addicted Inventor and lead developer of fCMS site system Contributor and translator for the PHP manual Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 3 / 26
  • 4. Tobias Schlitt Tobias Schlitt <toby@php.net> PHP since 2001 Freelancing consultant Qualified IT Specialist Studying CS at TU Dortmund (finishing 2010) OSS addicted PHP eZ Components PHPUnit Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 4 / 26
  • 5. So, what about you? Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 5 / 26
  • 6. Conferences are about contacts That is why both begin with con. . . Who are you? What is your business? What is your intention behind coming to IPC? What do you expect from this workshop? Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 6 / 26
  • 7. What can you expect? Workshop XPath Introduction to XML Tuesday, 13:45 - 14:45 Working on XML data with XPath in depth PHP Validating XML Practical tips and tricks Tuesday, 15:15 - 16:15 Interactive: What would you like DTD, XML Schema and to know? RelaxNG Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 7 / 26
  • 8. Rules for this workshop Allways Stick to your place! Never ask! Repeat: I will not ask anything! We are not here to show you anything useful! The only correct solution is told by us! Do not give feedback on http://joind.in/1041 Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 8 / 26
  • 9. Rules for this workshop Allways Stick to your place! Never ask! Repeat: I will not ask anything! We are not here to show you anything useful! The only correct solution is told by us! Do not give feedback on http://joind.in/1041 Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 8 / 26
  • 10. Outline 1 Overview 2 XML Overview Get into code. . . 3 XML in PHP 4 Open part Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 9 / 26
  • 11. What is XML? General specification for creating markup languages Data exchange between computer systems System independent Human readable Most used on the web Successor of SGML W3C recommendation 1.0 1998 (last update 2008-11-26) 1.1 2004 (last update 2006-08-16) Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 10 / 26
  • 12. XML languages by example XHTML XML variant of the popular HTML RSS Really Simply Syndication Provide news / updates / ... of websites Read by special clients Aggregation on portals / planets SVG Scalable Vector Graphics Describe vector graphics in XML Potentially interactive / animated (via ECMAScript) Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 11 / 26
  • 13. Related technologies - Schemas Schema A schema defines the structure XML instance documents. XMLSchema Written in XML W3C recommendation Popular RelaxNG 2 syntax variants XML based Short plain text based OASIS / ISO standard Popular DTD Plain text W3C recommendation Deprecated Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 12 / 26
  • 14. Related technologies - Querying Query A query extracts a sub-set of information from a data source. XPath W3C recommendation Navigation in XML documents more on that later... XQuery Functional programming language Allows complex queries Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 13 / 26
  • 15. Practical Let’s get into the code Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 14 / 26
  • 16. Outline 1 Overview 2 XML 3 XML in PHP DOM XMLReader/-Writer 4 Open part Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 15 / 26
  • 17. Overview XML APIs PHP has quite some XML APIs. The most important are: DOM XMLReader / XMLWriter SimpleXML Deprecated are: DOM XML XML Parser Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 16 / 26
  • 18. Overview - DOM Document Object Model Standardized API to access XML tree W3C recommendation Level 1 in 1999 Currently: Level 3 (2004) Available in many languages C Java Perl Python ... Represents XML nodes as objects Loads full XML tree into memory Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 17 / 26
  • 19. Overview - XMLReader/-Writer Popular approach to access XML data Similar implementations available in Java C# Pull / push based Does not load XML fully into memory Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 18 / 26
  • 20. Overview - SimpleXml Very simple access to XML data Unique (?) to PHP Represents XML structures as objects Initial implementation hackish Loads full XML tree into memory You don’t want to use SimpleXML, seriously! Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 19 / 26
  • 21. APIs compared DOM XMLReader/-Writer SimpleXML Read • Write ◦ Manipulate • • Full control - Namespaces ◦ XPath - Validate DTD DTD - Schema Schema RelaxNG RelaxNG Comfort • ◦ Fully supported • Supported but not nice ◦ Poorly supported - Not supported at all Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 20 / 26
  • 22. Practical Let’s get into the code Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 21 / 26
  • 23. Practical Let’s get into the code Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 22 / 26
  • 24. Outline 1 Overview 2 XML 3 XML in PHP 4 Open part Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 23 / 26
  • 25. What would you like to do? Discuss a particular problem? See a special XML technique in PHP? Get to know related techniques? Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 24 / 26
  • 26. Q/A Are there any questions left? Please give us some feedback! Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 25 / 26
  • 27. The end We hope you enjoyed the workshop! Slides and material Delivered by Software & Support http://schlitt.info/opensource On Slideshare (http://slideshare.net) Contact us: Arne Blankerts <arne@thephp.cc> Tobias Schlitt <toby@php.net> Give us feedback on http://joind.in/1041 Arne Blankerts, Tobias Schlitt (IPC 2009) Professional XML with PHP 2009-11-15 26 / 26