parsing xml with PHP simplexml_load_string

acryo69

New Member
so i have this XML: the result of \[code\]var_dump\[/code\]\[code\]string '<?xml version="1.0" encoding="UTF-8" standalone="no"?><data><entry key="message Type"><![ CDATA[ urgent ]]></entry><entry key="message Title"><![ CDATA[ teswt ]]></entry><entry key="message Body"><![ CDATA[ teasd ]]></entry><entry key="message Priority"><![ CDATA[ 1 ]]></entry></data>' (length=260)\[/code\]my code looks like this:\[code\]$xml = simplexml_load_string($tablerow['data']);$inputs = $xml->xpath("/schema/user_input[@type!='hidden']/input|/schema/input");foreach($inputs as $cur_input) { $cur_input_name = (string)$cur_input['name']; $cur_input_value = http://stackoverflow.com/questions/12530959/$task_input_values[$cur_input_name]; $input_name = isset($cur_input['label']) ? (string)$cur_input['label'] : $cur_input['name'];} var_dump($tablerow['data']);\[/code\]\[code\]$tablerow['data']\[/code\] is the XML from the DB. any help how to get the \[code\]message Title\[/code\] value from this??Thanks!
 
Back
Top