You can
work with xml in any language and php is one among them. If you are
familiar with the DOM, you can work the DOM itself using php. The steps
to work with xml in php too are the same as you would do in other languages.
_______________________________________________
_______________________________________________
You have
to create a new DOM document and then load the xml file you are going
to work with into it. Then you will be using the functions available
to navigate through the xml document to get the elements and their values
and then print it out on the screen.
The command
new DOMDocument(); is used to create a new document object and the command
load('xmlfile.xml'); to load the xml file you need.
You can
use getElementsByTagName("element_name") to get all the elements
with that tag and store them in an array and then use that particular
array's item(n)->nodeValue to get the value of a particular node.
You can loop through the node using a 'for' loop and print the values
of each node.
The PHP
installations include a SAX parser. You can use this parser to parse
the xml files. It is another way to work with the xml file.
posted by Will Senn on Wed 30th Nov 2005 19:03 UTC (OS News)
This latest installment in the Core series from Prentice Hall PTR is a welcome arrival to the PHP/MySQL space. It is jam packed with useful information. At a little over 850 pages, this volume contains information on nearly every topic of interest in both the PHP and MySQL subject areas.
Newsfeed (Web-User)
We offer a newsfeed displaying the 10 latest news articles which you can use free of charge on your site. Site of the day We offer a website review of the day feed, offering a different website review every weekday, which you can use free of charge on your site.
Ranorex® Releases Ranorex V1.5, Offering Single, Integrated Software Test Studio (PRWeb via Yahoo! News)
Ranorex® GmbH, a leading global provider of automated software testing solutions, today announced the release of Ranorex V1.5, the newest version of its flagship software testing application. Leading the additions in Ranorex V1.5 is Ranorex Studio, a complete test development environment that brings all Ranorex features together, allowing the user to create and maintain professional test ...
Linked by Thom Holwerda on Wed 13th Jul 2005 17:02 UTC (New Mobile Computing)
This tutorial is part I of a three-part series ( part II | part III ) that takes you from the most basic PHP script to working with databases and streaming from the file system by documenting the building of a document workflow system.