By Amrita Dubey SkillSoft Press

Methods to use SAX, XSLT, and XPath to govern XML records, in addition to use of XML-RPC protocol for getting access to approaches on a distant laptop, and masses extra.

Show description

Read or Download Integrating PHP and XML PDF

Similar microsoft programming books

Integrating PHP with Windows

Entry and run home windows® net and database applied sciences with PHPTake your Hypertext Preprocessor programming talents deep into Windows—and construct Hypertext Preprocessor functions that run successfully and successfully on an array of home windows applied sciences. jam-packed with hands-on workouts, this in-depth consultant indicates you ways to exploit personal home page to have interaction with web info prone 7.

Coding Faster: Getting More Productive with Microsoft Visual Studio: Covers Microsoft Visual Studio 2005, 2008, and 2010

Take a close inspect visible Studio - and examine functional concepts that can assist you paintings extra successfully. This totally revised and accelerated model of visible Studio information: 251 how one can enhance Your productiveness contains a finished selection of guidance and shortcuts for operating with the code editor, visible designers, searches, debugger, and different good points in visible Studio 2005, 2008, and 2010.

Extra resources for Integrating PHP and XML

Sample text

The above listing retrieves the text data from an XML document. The DOM parser creates an array to hold the name and the ID of the students. The foreach loop iterates the elements and adds the character data found while traversing through the DOM tree in the, $data array. Figure 3-4 shows the output of Listing 3-9: Figure 3-4: The Retrieved Character Data The DomAttribute Class The DomAttribute class creates the attr object that returns the attribute of an element. Listing 3-10 shows the structure of the DomAttribute class: Listing 3-10: Structure of the DomAttribute Class class DomAttribute { Properties name value Method name() } The above listing specifies the method and properties of the DomAttribute class.

The syntax of the get_attribute() method is: objectDomElement ->get_attribute(string); • set_attribute(): Adds a new attribute to the node. The syntax of the set_attribute() method is: 56 Chapter 3: PHP and Document Object Model Chapter 3: PHP and Document Object Model 57 bool DomElement->set_attribute ( string name, string value) • remove_attribute(): Removes an attribute from the element structure. The syntax of the remove_attribute() method is: bool DomElement->remove_attribute (string); • children(): Returns an array of the DomElement object containing the child nodes of the element.

Isset($this->studentDetail[$entry[0]])) { $this->studentDetail[$entry[0]]=Array(); } $this->studentDetail[$entry[0]][]=$entry[1]; } return 1; } } // Function that overwrites the special character with the XML entities. txt text file, using the ParseStudent parsing class. • The parsing class reads the text file and stores the content according to the number of lines in the text file. • The chop() function stores the content of text file in the entry array, and the explode() function splits the text file using a string delimiter.

Download PDF sample

Rated 4.80 of 5 – based on 37 votes