Dump a tree travaux.xml (with php) using DOM

This example demonstrates how to walk through parts of the XML tree

To have a look at the source code, please simple consult the current directory


* List Debug - The tree
This list has 1 elements
  1. * Element Debug, Infos:
    Node Type = 1
    Element Name =student
    * List Debug - Children of student
    This list has 9 elements
    1. * Element Debug, Infos:
      Node Type = 3
      Node Value =
    2. * Element Debug, Infos:
      Node Type = 1
      Element Name =campus
      Attributes: [ login = nova ]
    3. * Element Debug, Infos:
      Node Type = 3
      Node Value =
    4. * Element Debug, Infos:
      Node Type = 1
      Element Name =personal-data
      Attributes: [ year = 1 ] [ promotion = Gina ] [ role = student ]
      * List Debug - Children of personal-data
      This list has 9 elements
      1. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      2. * Element Debug, Infos:
        Node Type = 1
        Element Name =first-name
        * List Debug - Children of first-name
        This list has 1 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =Nicolas
      3. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      4. * Element Debug, Infos:
        Node Type = 1
        Element Name =family-name
        * List Debug - Children of family-name
        This list has 1 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =NOVA
      5. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      6. * Element Debug, Infos:
        Node Type = 1
        Element Name =home-url
        * List Debug - Children of home-url
        This list has 1 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =http://tecfa.unige.ch/perso/staf/nova
      7. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      8. * Element Debug, Infos:
        Node Type = 1
        Element Name =email
        * List Debug - Children of email
        This list has 1 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =nicolas nova at somewhere
      9. * Element Debug, Infos:
        Node Type = 3
        Node Value =
    5. * Element Debug, Infos:
      Node Type = 3
      Node Value =
    6. * Element Debug, Infos:
      Node Type = 1
      Element Name =moo
      Attributes: [ salle = http://tecfamoo.unige.ch:7778/objbrowse/6264 ] [ personnage = the_icon ]
    7. * Element Debug, Infos:
      Node Type = 3
      Node Value =
    8. * Element Debug, Infos:
      Node Type = 1
      Element Name =exercises
      * List Debug - Children of exercises
      This list has 27 elements
      1. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      2. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 24 ] [ mod-day = 11 ] [ creation-year = 2000 ] [ creation-month = 11 ] [ creation-day = 24 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 7 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 12 ] [ ex-number = 1 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Rapport Usability Test
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf12/ex1/test.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      3. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      4. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 12 ] [ mod-day = 4 ] [ creation-year = 2000 ] [ creation-month = 12 ] [ creation-day = 4 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 7 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 11 ] [ ex-number = 1 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Fiche expertise : "Les secrets de l'intelligence"
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf11/fiche1.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      5. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      6. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 11 ] [ mod-day = 08 ] [ creation-year = 2000 ] [ creation-month = 11 ] [ creation-day = 21 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 7 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 13 ] [ ex-number = 1 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Rapport MEDIA
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf13/ex1/media.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      7. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      8. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 11 ] [ mod-day = 08 ] [ creation-year = 2000 ] [ creation-month = 11 ] [ creation-day = 21 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 7 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 13 ] [ ex-number = 2 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Projet Staf 13
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf13/ex.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      9. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      10. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 11 ] [ mod-day = 08 ] [ creation-year = 2000 ] [ creation-month = 11 ] [ creation-day = 8 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 9 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 14 ] [ ex-number = 1a ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Homepage
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/perso/staf/nova/welcome.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        8. * Element Debug, Infos:
          Node Type = 1
          Element Name =report
          Attributes: [ report-url = http://tecfa.unige.ch/staf/staf-g/nova/staf14/ex1/comment.html#home ]
        9. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      11. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      12. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 12 ] [ mod-day = 11 ] [ creation-year = 2000 ] [ creation-month = 11 ] [ creation-day = 08 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 9 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 14 ] [ ex-number = 1b ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Page travaux
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/welcome.sxml
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        8. * Element Debug, Infos:
          Node Type = 1
          Element Name =report
          Attributes: [ report-url = http://tecfa.unige.ch/staf/staf-g/nova/staf14/ex1/comment.html#travaux ]
        9. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      13. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      14. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 12 ] [ mod-day = 11 ] [ creation-year = 2000 ] [ creation-month = 11 ] [ creation-day = 08 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 9 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 14 ] [ ex-number = 1c ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Personnage moo
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfamoo.unige.ch:7778/objbrowse/6501
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        8. * Element Debug, Infos:
          Node Type = 1
          Element Name =report
          Attributes: [ report-url = http://tecfa.unige.ch/staf/staf-g/nova/staf14/ex1/comment.html#moo ]
        9. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      15. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      16. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 12 ] [ mod-day = 11 ] [ creation-year = 2000 ] [ creation-month = 11 ] [ creation-day = 08 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 9 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 14 ] [ ex-number = 1d ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Bureau moo
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfamoo.unige.ch:7778/objbrowse/6264
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        8. * Element Debug, Infos:
          Node Type = 1
          Element Name =report
          Attributes: [ report-url = http://tecfa.unige.ch/staf/staf-g/nova/staf14/ex1/comment.html#moo ]
        9. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      17. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      18. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 12 ] [ mod-day = 04 ] [ creation-year = 2000 ] [ creation-month = 12 ] [ creation-day = 15 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 9 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 14 ] [ ex-number = 2 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Questionnaire PHP
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf14/ex2/welcome.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        8. * Element Debug, Infos:
          Node Type = 1
          Element Name =report
          Attributes: [ report-url = http://tecfa.unige.ch/staf/staf-g/nova/staf14/ex2/comment.html ]
        9. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      19. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      20. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 12 ] [ mod-day = 04 ] [ creation-year = 2000 ] [ creation-month = 12 ] [ creation-day = 15 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 9 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 14 ] [ ex-number = 3 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Questionnaire Javascript
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf14/ex3/welcome.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        8. * Element Debug, Infos:
          Node Type = 1
          Element Name =report
          Attributes: [ report-url = http://tecfa.unige.ch/staf/staf-g/nova/staf14/ex3/comment.html ]
        9. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      21. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      22. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2000 ] [ mod-month = 12 ] [ mod-day = 07 ] [ creation-year = 2000 ] [ creation-month = 12 ] [ creation-day = 07 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 7 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 15 ] [ ex-number = 1 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Projet
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf15/intro.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      23. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      24. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2001 ] [ mod-month = 1 ] [ mod-day = 5 ] [ creation-year = 2001 ] [ creation-month = 1 ] [ creation-day = 05 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 7 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 16 ] [ ex-number = 1 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Projet
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf16/ex1/welcome.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      25. * Element Debug, Infos:
        Node Type = 3
        Node Value =
      26. * Element Debug, Infos:
        Node Type = 1
        Element Name =exercise
        Attributes: [ status = draft ] [ version = 0.1 ] [ mod-by = Nicolas ] [ mod-year = 2001 ] [ mod-month = 1 ] [ mod-day = 5 ] [ creation-year = 2001 ] [ creation-month = 1 ] [ creation-day = 16 ] [ id = 1 ]
        * List Debug - Children of exercise
        This list has 7 elements
        1. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        2. * Element Debug, Infos:
          Node Type = 1
          Element Name =staf
          Attributes: [ no = 17 ] [ ex-number = 1 ]
        3. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        4. * Element Debug, Infos:
          Node Type = 1
          Element Name =title
          * List Debug - Children of title
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =Description du projet (Réalisé avec R. Glaus)
        5. * Element Debug, Infos:
          Node Type = 3
          Node Value =
        6. * Element Debug, Infos:
          Node Type = 1
          Element Name =url
          * List Debug - Children of url
          This list has 1 elements
          1. * Element Debug, Infos:
            Node Type = 3
            Node Value =http://tecfa.unige.ch/staf/staf-g/nova/staf17/description.html
        7. * Element Debug, Infos:
          Node Type = 3
          Node Value =
      27. * Element Debug, Infos:
        Node Type = 3
        Node Value =
    9. * Element Debug, Infos:
      Node Type = 3
      Node Value =