"line 1\nline 2\nline 3 (no eol)"
"Thumbs.db\n.htaccess\n"
"line one\nline two\nline three (yes eol)\n"
"this is single line"
<?php $xml = <<<XML <?xml version="1.0"?> <properties> <target path="svn://some.repo.com/path/to/folder/file"> <property name="test:multi_line_new_no_eol">line 1 line 2 line 3 (no eol)</property> <property name="svn:ignore">Thumbs.db .htaccess </property> <property name="test:multi_line_new">line one line two line three (yes eol) </property> <property name="test:single_line_new">this is single line</property> </target> </properties> XML; $proplist = new SimpleXMLElement($xml); foreach ($proplist->target->property as $property) { print(json_encode((string) $property)."<br>".PHP_EOL); } ?>