只有当希望修改本教程中的代码以适应具体应用程序时才需要了解文档对象模型(DOM)的工作原理。
You need to know how the Document Object Model (DOM) works only if you wish to change the code in this tutorial to suit your own applications.
所生成的对象模型方法的主要缺点是它使您的代码与XML文档结构直接相关。
The main drawback to the generated object model approach is that it ties your code directly to the structure of the XML document.
这段代码创建了一个新的 XML 文档对象模型(Document Object Model ,DOM),然后将 $items 数组中的所有数据都保存到这个模型中。
This code creates a new XML Document Object Model (DOM), then adds all of the data in the $items array to it.
应用推荐