This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Grab XML | |
$xml_file = "rsform.xml"; | |
// Load xml data. | |
$xml = file_get_contents($xml_file); | |
// Strip whitespace between xml tags | |
$xml = preg_replace('~\s*(<([^>]*)>[^<]*</\2>|<[^>]*>)\s*~','$1',$xml); | |
// Convert CDATA into xml nodes. | |
$xml = simplexml_load_string($xml,'SimpleXMLElement', LIBXML_NOCDATA); | |
// Make variables |