prowebinteractiveinc
asked on
checking for xml tag name exists in PHP
I want to check if certain tags exist in xml
example:
example:
$data = $xmlString;
$xml = simplexml_load_string($data);
// does $xml->xxxName exist the do something
$customerName = $xml->xxxName;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If this is a follow-on from your earlier question that had invalid XML, you would want to start by loading the XML, then testing to see if the object existed or if the SimpleXML_Load_xxx() returned FALSE. Just a thought... ~Ray