accessing xml docs?

From: Date: Thu, 20 Dec 2001 06:03:38 +0000
Subject: accessing xml docs?
Groups: php.db php.general 
Request: Send a blank email to php-db+get-15197@lists.php.net to get a copy of this message
i'm trying to use the following code to access a node w/ id=$idnum in record.xml : $doc=new DomDocument; $doc=xmldocfile( "record.xml" ); $strXPath = "/Students[@id='$idnum']"; $context=xpath_new_context($doc); $query = xpath_eval($context,$strXpath); $node = $query->nodeset[0]; $strValue = $node->content; problem is, it decides that DomDocument isn't a class, so i get a fatal error... when i try to skip the instantiation, it says that xmldocfile() is undefined. the documentation is for 4.0.0, it's an experimental function... does anyone know how to open an XML file for data retrieval/editing in 4.0.6? or if i'm making a mistake in my code? i'm pretty new to this, that could very well be the case... THANKS, shahin-

« previous php.db (#15197) next »