On Fri, 10 May 2002, Meir Kriheli wrote: > On Friday 10 May 2002 03:05, Thalis A. Kalfigopoulos wrote: > > I'm trying to get DOMXML to work with PHP4.2.0. I've compiled with > > --with-dom and phpinfo() says it's there: DOM/XML enabled > > libxml Version 2.4.18 > > HTML Support enabled > > XPath Support enabled > > XPointer Support enabled > > > > The following program though doesn't seem to work: > > > > $xmlstring='a valid xml document here'; > > $domdoc=xmldoc($xmlstring); > > $root=$doc->document_element(); <--- throw error > > Shouldn't this be: > > $root=$domdoc->document_element(); > > I don't see $doc in the code snippet..
Sorry, that was a typo on my part. The problem persists even for $root=$domdoc->document_element(); I try this: $domdoc=xmldoc($xmlstring); if(!method_exists($domdoc,"document_element")){ echo("WTF?"); } and I actually get the printout :-( Any ideas what's wrong? Does anyone have DOM up & working? TIA, Thalis > > I get an error regarding the call to DomDocument->document_element(). Also > > I'm forced to use xmldoc() instead of the newer domxml_open_mem() because > > it is also not recognized. What am I missing? > > > > thanks in advance, > > Thalis > > -- > Meir Kriheli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php