258 CHAPTER 7 SIMPLEXML The initial $sxe
258 CHAPTER 7 SIMPLEXML The initial $sxe object was created using the new keyword with the extended class. As shown in the second line, the object returned from the node1 property was created using the extended class. Once the initial object based on a SimpleXMLElement class is created, all objects will be created using the same class. The new keyword is nice to use when working with XML contained in a string, but it doesn t help much when the data resides in a file. As mentioned in the earlier Creating a SimpleXMLElement Object section, the load functions take an optional class_nameparameter. This parameter indicates the class to use for creating the initial object. Using the mySXE class, you can load data from either a string or a file and have the ability to use the custom appendChild() method: $sxe = simplexml_load_string(”
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services