Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Searching and Replacing Nodes with SimpleXML in PHP 5 (Part 3)
Jun 26, 2006 @ 12:13:48

DevShed has posted part three of their "working with SImpleXML in PHP5" series today, focusing this time on the searching and replacing of nodes within a loaded XML string.

So far, the couple of functions that I mentioned before actually do a good job of parsing simple XML files and strings. However, the "simpleXML" library has a few additional handy functions that I'd like to show you in this last tutorial. That said, in the next few lines, I'll be covering these functions, in order to demonstrate how to quickly search and replace nodes within XML data strings.

They start with some node comparison and locating the nodes inside of the XML (with a little help from XPath). Once they're found, they show how to replace the node itself with the asXML method PHP provides. Finally, they give a more "real life" example of how to blend it all together.

tagged: simplexml php5 tutorial search replace nodes part3 simplexml php5 tutorial search replace nodes part3

Link:

DevShed:
Searching and Replacing Nodes with SimpleXML in PHP 5 (Part 3)
Jun 26, 2006 @ 12:13:48

DevShed has posted part three of their "working with SImpleXML in PHP5" series today, focusing this time on the searching and replacing of nodes within a loaded XML string.

So far, the couple of functions that I mentioned before actually do a good job of parsing simple XML files and strings. However, the "simpleXML" library has a few additional handy functions that I'd like to show you in this last tutorial. That said, in the next few lines, I'll be covering these functions, in order to demonstrate how to quickly search and replace nodes within XML data strings.

They start with some node comparison and locating the nodes inside of the XML (with a little help from XPath). Once they're found, they show how to replace the node itself with the asXML method PHP provides. Finally, they give a more "real life" example of how to blend it all together.

tagged: simplexml php5 tutorial search replace nodes part3 simplexml php5 tutorial search replace nodes part3

Link:


Trending Topics: