Login   Register  
PHP Classes
elePHPant
Icontem

File: sampleOutput.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Leszek Piatek  >  Slow XML Parser  >  sampleOutput.txt  >  Download  
File: sampleOutput.txt
Role: Auxiliary data
Content type: text/plain
Description: sample.php output (result of parsing sample.xml)
Class: Slow XML Parser
Parse XML documents using pure PHP code
Author: By
Last change: New better exaple -> new better output; )
Date: 6 years ago
Size: 2,393 bytes
 

Contents

Class file image Download
What we parse:

<?xml version="1.0" encoding="iso-8859-2" ?>
<doc atr1="value">
	<item1 atr1="asdf" atr2="asdddd">value of item1</item1>
	<item2>item2 value</item2>
	<item2>whatever</item2>
	<item3>
		<hm atr1="what?">some text</hm>
	</item3>
</doc>

What we get:

Array
(
    [doc] => Array
        (
            [0] => Array
                (
                    [item1] => Array
                        (
                            [0] => Array
                                (
                                    [@data] => value of item1
                                    [@attributes] => Array
                                        (
                                            [atr1] => asdf
                                            [atr2] => asdddd
                                        )

                                )

                        )

                    [item2] => Array
                        (
                            [0] => Array
                                (
                                    [@data] => item2 value
                                )

                            [1] => Array
                                (
                                    [@data] => whatever
                                )

                        )

                    [item3] => Array
                        (
                            [0] => Array
                                (
                                    [hm] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [@data] => some text
                                                    [@attributes] => Array
                                                        (
                                                            [atr1] => what?
                                                        )

                                                )

                                        )

                                )

                        )

                    [@attributes] => Array
                        (
                            [atr1] => value
                        )

                )

        )

)
iso-8859-2