The XML File : Sample XML element Sample XML element containing a lot of text, enough to be put on a separate line. matters not matters not block ]]> matters not The Output : Array ( [subbranch] => Sample XML element [longsubbranch] => Sample XML element containing a lot of text, enough to be put on a separate line. [parentofmany] => Array ( [0] => Array ( [@attributes] => Array ( [attribute] => value [otherattribute] => other ) [child] => Array ( [0] => matters not [1] => matters not ) ) [1] => Array ( [child] => Array ( [0] => Contents of block [1] => Array ( [underchild] => matters not ) ) ) ) )