Login   Register  
PHP Classes
elePHPant
Icontem

File: TestResults.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mark Holtzhausen  >  XMLns2array  >  TestResults.txt  >  Download  
File: TestResults.txt
Role: Sample output
Content type: text/plain
Description: Test File Containing the results from the test.php execution
Class: XMLns2array
Convert a XML document into an array
Author: By
Last change:
Date: 5 years ago
Size: 13,024 bytes
 

Contents

Class file image Download
XML Example Code to Parse:

<?xml version="1.0" encoding="utf-8"?>
<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://www.cmis.org/2008/05" xmlns:alf="http://www.alfresco.org">
  <workspace cmis:repositoryRelationship="self">
    <atom:title>Main Repository</atom:title>
    <cmis:repositoryInfo>
      <cmis:repositoryId>0f91f397-7cd1-479b-9f56-266affe188d8</cmis:repositoryId>
      <cmis:repositoryName>Main Repository</cmis:repositoryName>
      <cmis:cmisVersionsSupported cmis:normal="bleg">
      	<major>0</major>
      	<minor>5</minor>
      </cmis:cmisVersionsSupported>
    </cmis:repositoryInfo>
    <collection href="http://localhost:8080/alfresco/service/api/path/workspace/SpacesStore/Company%20Home/children" cmis:collectionType="root-children">
      <atom:title>root collection</atom:title>
    </collection>
    <collection href="http://localhost:8080/alfresco/service/api/path/workspace/SpacesStore/Company%20Home/descendants" cmis:collectionType="root-descendants">
      <atom:title>root collection</atom:title>
    </collection>
  </workspace>
</service>

Testing XML String Parsing into Array

Array
(
    [@attributes] => Array
        (
        )

    [@children] => Array
        (
            [workspace] => Array
                (
                    [0] => Array
                        (
                            [@attributes] => Array
                                (
                                    [cmis:repositoryRelationship] => self
                                )

                            [@children] => Array
                                (
                                    [collection] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [@attributes] => Array
                                                        (
                                                            [cmis:collectionType] => root-children
                                                        )

                                                    [@children] => Array
                                                        (
                                                            [atom:title] => Array
                                                                (
                                                                    [0] => Array
                                                                        (
                                                                            [@attributes] => Array
                                                                                (
                                                                                )

                                                                            [@children] => Array
                                                                                (
                                                                                )

                                                                            [@value] => root collection
                                                                        )

                                                                )

                                                        )

                                                )

                                            [1] => Array
                                                (
                                                    [@attributes] => Array
                                                        (
                                                            [cmis:collectionType] => root-descendants
                                                        )

                                                    [@children] => Array
                                                        (
                                                            [atom:title] => Array
                                                                (
                                                                    [0] => Array
                                                                        (
                                                                            [@attributes] => Array
                                                                                (
                                                                                )

                                                                            [@children] => Array
                                                                                (
                                                                                )

                                                                            [@value] => root collection
                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                    [cmis:repositoryInfo] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [@attributes] => Array
                                                        (
                                                        )

                                                    [@children] => Array
                                                        (
                                                            [cmis:repositoryId] => Array
                                                                (
                                                                    [0] => Array
                                                                        (
                                                                            [@attributes] => Array
                                                                                (
                                                                                )

                                                                            [@children] => Array
                                                                                (
                                                                                )

                                                                            [@value] => 0f91f397-7cd1-479b-9f56-266affe188d8
                                                                        )

                                                                )

                                                            [cmis:repositoryName] => Array
                                                                (
                                                                    [0] => Array
                                                                        (
                                                                            [@attributes] => Array
                                                                                (
                                                                                )

                                                                            [@children] => Array
                                                                                (
                                                                                )

                                                                            [@value] => Main Repository
                                                                        )

                                                                )

                                                            [cmis:cmisVersionsSupported] => Array
                                                                (
                                                                    [0] => Array
                                                                        (
                                                                            [@attributes] => Array
                                                                                (
                                                                                    [cmis:normal] => bleg
                                                                                )

                                                                            [@children] => Array
                                                                                (
                                                                                    [major] => Array
                                                                                        (
                                                                                            [0] => Array
                                                                                                (
                                                                                                    [@attributes] => Array
                                                                                                        (
                                                                                                        )

                                                                                                    [@children] => Array
                                                                                                        (
                                                                                                        )

                                                                                                    [@value] => 0
                                                                                                )

                                                                                        )

                                                                                    [minor] => Array
                                                                                        (
                                                                                            [0] => Array
                                                                                                (
                                                                                                    [@attributes] => Array
                                                                                                        (
                                                                                                        )

                                                                                                    [@children] => Array
                                                                                                        (
                                                                                                        )

                                                                                                    [@value] => 5
                                                                                                )

                                                                                        )

                                                                                )

                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                    [atom:title] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [@attributes] => Array
                                                        (
                                                        )

                                                    [@children] => Array
                                                        (
                                                        )

                                                    [@value] => Main Repository
                                                )

                                        )

                                )

                        )

                )

        )

)