SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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)
 

Mehr von Tobias Schlitt

Mehr von 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
 

Kürzlich hochgeladen

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Kürzlich hochgeladen (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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