① 使用for…循环遍历xml数据
② 使用foreach…循环遍历xml数据
③ 使用children方法实现对xml数据的遍历
children方法
public SimpleXMLElement SimpleXMLElement::children() :获取当前元素的所有子节点
运行结果:
① 使用for…循环遍历xml数据
② 使用foreach…循环遍历xml数据
③ 使用children方法实现对xml数据的遍历
children方法
public SimpleXMLElement SimpleXMLElement::children() :获取当前元素的所有子节点
运行结果: