dev-master
9999999-devThis will convert a Simple XML string to a associative array.
MIT
The Development Requires
v1.0.0
1.0.0.0This will convert a Simple XML string to a associative array.
MIT
The Development Requires
Wallogit.com
2017 © Pedro Peláez
This will convert a Simple XML string to a associative array.
This package allows you to easily convert a xml string to a associative array., (*1)
<urlset>
<url>
<loc>http://www.google.com</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>http://www.yahoo.com</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
<url>
<loc>http://www.bing.com</loc>
<changefreq>monthly</changefreq>
<priority>1</priority>
</url>
</urlset>';
// Pass in XML String
$parser = new XML2Array\Parser($xml);
// Convert XML to Associative Array
$output = $parser->toArray();
// Print out results
print '
';
print_r($output);
print '
';
Array
(
[url] => Array
(
[0] => Array
(
[loc] => http://www.google.com
[changefreq] => monthly
[priority] => 1
)
[1] => Array
(
[loc] => http://www.yahoo.com
[changefreq] => monthly
[priority] => 1
)
[2] => Array
(
[loc] => http://www.bing.com
[changefreq] => monthly
[priority] => 1
)
)
)
This will convert a Simple XML string to a associative array.
MIT
This will convert a Simple XML string to a associative array.
MIT