我需要执行一个API,它的响应是一个XML。 但是XML值在XML标签内。php获取xml内部标签内容
例如
<example>
<item productid = "1" productname = "xxx" cost = "5.3"/>
<item productid = "2" productname = "yyy" cost = "4.0"/>
<item productid = "3" productname = "zzz" cost = "1.75"/>
</example>
谁能告诉我,我怎样才能,标签之间移动,并得到elemnt值 例如:
example:
item:
productid -> 1,
productname -> xxx,
cost -> 5.3
item:
productid -> 2,
productname -> yyy,
cost -> 4.0
item:
productid -> 3,
productname -> zzz,
cost -> 1.75
感谢名单