Simple Xpath extraction 3 with PHP 5

 NOT DONE YET !! Wait a bit - can't make  XSL deal with DomNodes :(
This example grabs an XML file, extracts certain elements (i.e. exercice elements) and then will apply an XSLT stylesheet. It will not work with php 4.x or PHP 5 without XML support installed. So this makes use of: Here is the kind of input this example can deal with:
 <student>
  <exercises>
     <exercise id="" creation-day="28" creation-month="11" creation-year="02" mod-day="" mod-month="" mod-year="" mod-by="" version="" status="draft">

       <staf no="14" ex-number=" 1a "/>
       <title>Home page personnelle</title>
       <url>http://tecfa.unige.ch/perso/staf/lattion/welcome.html</url>
       <description>crťer sa homepage en xhtml</description>
       <report report-url="http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex1/comment.html"/>
     </exercise>
 .......
 <exercises>
<student>
See simple-xpath1 or 2 for xpath part, i.e. (go back.)

The source (simple-xpath3.phps or simple-xpath3.text is in this same directory. It is freeware :)


  1. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[5]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          Home page personnelle
          http://tecfa.unige.ch/perso/staf/lattion/welcome.html
          créer sa homepage en xhtml
          
        ' (length=141)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          Home page personnelle
          http://tecfa.unige.ch/perso/staf/lattion/welcome.html
          créer sa homepage en xhtml
          
        ' (length=141)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[16]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    
  2. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[6]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          Work Page
          http://tecfa.unige.ch/staf/staf-i/lattion/
          Mise en place de la page "travaux"
          
        ' (length=125)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          Work Page
          http://tecfa.unige.ch/staf/staf-i/lattion/
          Mise en place de la page "travaux"
          
        ' (length=125)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[17]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    
  3. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[7]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          Personnage et bureau MOO
          http://tecfa.unige.ch:7778/objbrowse/6949/
          créer son identité sur TecfaMOO
          
        ' (length=139)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          Personnage et bureau MOO
          http://tecfa.unige.ch:7778/objbrowse/6949/
          créer son identité sur TecfaMOO
          
        ' (length=139)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[16]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    
  4. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[8]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          Projet "logiciel de  classement de dvd "
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex2/Projet_dtd.html
          Projet d'un logiciel de classement de dvd avec base de donnée commune sur le web. Première étape: la dtd
        ' (length=248)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          Projet "logiciel de  classement de dvd "
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex2/Projet_dtd.html
          Projet d'un logiciel de classement de dvd avec base de donnée commune sur le web. Première étape: la dtd
        ' (length=248)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[17]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    
  5. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[9]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          Premiers Pas Avec XML
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex2/welcome.html
          Créer un dispositif affichant un contenu sous format XML. C'est la première étape du logiciel de classement de dvd
          
        ' (length=243)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          Premiers Pas Avec XML
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex2/welcome.html
          Créer un dispositif affichant un contenu sous format XML. C'est la première étape du logiciel de classement de dvd
          
        ' (length=243)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[16]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    
  6. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[10]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          Programmation PHP
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex3/welcome.html
          Création d'un quizz on-line portant sur l'origine des superstitions.
          
        ' (length=191)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          Programmation PHP
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex3/welcome.html
          Création d'un quizz on-line portant sur l'origine des superstitions.
          
        ' (length=191)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[17]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    
  7. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[11]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          JavaScript
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex4/welcome.html
          Reprise du quizz de l'exercice précédant et mise au point d'un feedback en Javascript.
          
        ' (length=203)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          JavaScript
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex4/welcome.html
          Reprise du quizz de l'exercice précédant et mise au point d'un feedback en Javascript.
          
        ' (length=203)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[16]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    
  8. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[12]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          Exposé
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex7/welcome.html
          Exposé traitant de l'utilité des standards du Web.
          
        ' (length=164)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          Exposé
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex7/welcome.html
          Exposé traitant de l'utilité des standards du Web.
          
        ' (length=164)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[17]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    
  9. exercise:
    /web/guides/php/examples/xpath/simple-xpath3.php:86:
    object(DOMElement)[13]
      public 'tagName' => string 'exercise' (length=8)
      public 'schemaTypeInfo' => null
      public 'nodeName' => string 'exercise' (length=8)
      public 'nodeValue' => string '
          
          VRML
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex5/welcome.html
          Création d'un page VRML regroupant tous les liens représentatifs de la volée Iris: Homepages, Workpages, Blogs et Portails.
          
        ' (length=235)
      public 'nodeType' => int 1
      public 'parentNode' => string '(object value omitted)' (length=22)
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => string '(object value omitted)' (length=22)
      public 'lastChild' => string '(object value omitted)' (length=22)
      public 'previousSibling' => string '(object value omitted)' (length=22)
      public 'nextSibling' => string '(object value omitted)' (length=22)
      public 'attributes' => string '(object value omitted)' (length=22)
      public 'ownerDocument' => string '(object value omitted)' (length=22)
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => string 'exercise' (length=8)
      public 'baseURI' => string '/web/guides/php/examples/xpath/student.xml' (length=42)
      public 'textContent' => string '
          
          VRML
          http://tecfa.unige.ch/staf/staf-i/lattion/staf14/ex5/welcome.html
          Création d'un page VRML regroupant tous les liens représentatifs de la volée Iris: Homepages, Workpages, Blogs et Portails.
          
        ' (length=235)
    
    - exercise node name = exercise
    dom fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:94:
    object(DOMDocument)[16]
      public 'doctype' => null
      public 'implementation' => string '(object value omitted)' (length=22)
      public 'documentElement' => null
      public 'actualEncoding' => null
      public 'encoding' => null
      public 'xmlEncoding' => null
      public 'standalone' => boolean true
      public 'xmlStandalone' => boolean true
      public 'version' => string '1.0' (length=3)
      public 'xmlVersion' => string '1.0' (length=3)
      public 'strictErrorChecking' => boolean true
      public 'documentURI' => null
      public 'config' => null
      public 'formatOutput' => boolean false
      public 'validateOnParse' => boolean false
      public 'resolveExternals' => boolean false
      public 'preserveWhiteSpace' => boolean true
      public 'recover' => boolean false
      public 'substituteEntities' => boolean false
      public 'nodeName' => string '#document' (length=9)
      public 'nodeValue' => null
      public 'nodeType' => int 9
      public 'parentNode' => null
      public 'childNodes' => string '(object value omitted)' (length=22)
      public 'firstChild' => null
      public 'lastChild' => null
      public 'previousSibling' => null
      public 'nextSibling' => null
      public 'attributes' => null
      public 'ownerDocument' => null
      public 'namespaceURI' => null
      public 'prefix' => string '' (length=0)
      public 'localName' => null
      public 'baseURI' => null
      public 'textContent' => string '' (length=0)
    

    dom fragment's kids: DOMNodeList Object ( [length] => 0 )
    html fragment:
    /web/guides/php/examples/xpath/simple-xpath3.php:101:null
    

D.K.S.
Last modified: Fri Jan 21 12:30:15 MET 2005