[xml] method getNamedItem() of class DOMNamedNodeMap



I am sending this informational along to both the php and xml list.
 
I have FC2 installed. I updated my xml environment thusly:
- Downloaded  and installed in /usr/local/libxml2;
   libxml2-2.6.15.tar.gz:   ./configure --prefix=/usr/local/libxml2
   rpm -i --force --prefix /usr/local/libxml2 libxml2-devel-2.6.15-1.i386.rpm (I hate rpm's!, but couldn't find a tarball)
   libxslt-1.1.12.tar.gz:   ./configure --prefix=/usr/local/libxml2   --with-libxml-src="" _directory (this was the only way I could get it to compile, tried various with-libxml-prefix in vain, including linker flags and envars)
   rpm -i --force --prefix /usr/local/libxml2 libxslt-devel-1.1.12-1.i386.rpm
- removed /usr/include/libxml2/libxml directory ( got something about  dict.h compilation errors in make for php5.0.0RC3)
- php5.0.0.RC3 -  ./configure --prefix=/usr/local/php5 --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/libxml2 --with-xsl=/usr/local/libxml2 --enable-ftp   (this configure line is from phpinfo; xml and xsl panels show proper updated versions as well).
 
Now, everything works as before: testing with a sample php script, except that I still have a problem with the following section in my script:
 
$domDoc->loadXML( $str )   // $str is valid - simple xhtml file I'll not include here.
 
$objNamedNodeMap = new DOMNamedNodeMap( $domDoc );
// the following lines work
echo get_class ( $objNamedNodeMap);
print_r ( get_class_methods ( get_class ( $objNamedNodeMap ) ) );
// however, the following line causes no output to appear at the client, even previous echo's -- probably not reaching flush
echo get_class ( $objNamedNodeMap->getNamedItem ( "empHours" );  // from $str: <input name="empHours" ...
// I do get an appropriate warning from
echo get_class ( $objNamedNodeMap->getNamedItem ( 0 );  // warning ... expects exactly 1 parameter 0 given ...
 
I have no urgent need for this. I am studying php/classing/xml/xsl. I most likely committed a very newbie error, simply transmit this msg to the nearest bit bucket and except my apologies.
 
Wayne A.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]