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-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to