I have a PHP script that pulls an XML file from a remote server, and converts it to JSON using simplexml_load_string and json_encode. However, the simplexml_load_string seems t
You could use SimpleXML itself to read the attributes.
Example:
UNAVAILABLE'); foreach($xml->attributes() as $k=>$v) { echo $k." -> ".(string)$v."\n"; } ?>
dataItemId -> iid7 timestamp -> 2012-03-21T15:15:41-04:00 sequence -> 7 name -> Yfrt subType -> ACTUAL units -> MILLIMETER/SECOND