PHP XML Parsing

前端 未结 5 983
心在旅途
心在旅途 2020-12-14 04:55

Which is the best way to parse an XML file in PHP ?

First
Using the DOM object

//code
$dom = new DOMDocument();
$dom->load(         


        
5条回答
  •  眼角桃花
    2020-12-14 05:23

    If you're processing huge files don't parse them. Apply XSLT instead. That'll save you huge amounts of memory and processing time.

提交回复
热议问题