Re: The XML Generation. A question for real heroes and soon-to-be ones.

From: Date: Thu, 18 Mar 2004 23:36:36 +0000
Subject: Re: The XML Generation. A question for real heroes and soon-to-be ones.
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11385@lists.php.net to get a copy of this message
Matthias H. Risse wrote:
Hello folks: I am back from the Falkland Islands and now looking for a possiblity to easily to manipulate a 20k XML file. I used XML_Tree and tried XML_XPath, PHP SAX and PHP XMLDOM (extension), but somehow they seem to me like hunting a single ant with an atomic bomb. I am looking for a simple way to : 1) Read an XML string into something like a DOM/Tree 2) Find a specific node by identidier (something like ECMA/Javascript's ->FindElementById('funkyFrog')-Method (where funkyFrog is the identifier) 3) Manipulate some attributes of it 4) Render the new tree/model back into a string How would a real guru handle this most elegantly (OOPHP ;)? Any advice would be more than welcome.. Cheers {Matt}*
You could do some simple XSL or just use a regular expression. The regex shouldn't be too hard depending on what you want to do. If you're not looking to parse a lot of data, I'd say to use a regex. -- paperCrane <Justin Patrin>

« previous php.pear.general (#11385) next »