#37010 [NEW]: error while loading a string into dom object

From: Date: Fri, 07 Apr 2006 16:30:45 +0000
Subject: #37010 [NEW]: error while loading a string into dom object
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95433@lists.php.net to get a copy of this message
From: hari_sayiri at rediffmail dot com Operating system: windows 200 PHP version: 5.1.2 PHP Bug Type: DOM XML related Bug description: error while loading a string into dom object Description: ------------ I am posting a string from a vb.net pogram to a php program, the string is basically xml tags, i am able to get the string in php, but when u try to load the string using loadxml function i get the warning message Warning: DOMDocument::loadXML() [function.loadXML]: Start tag expected, '<' not found in Entity and so i am unable to retrieve the tag attributes and values. Reproduce code: --------------- $objDOM->loadXML($string); where $string is <?xml version='1.0' encoding='UTF-8'?><map><mapsize size='2500 2500'/> </map> Expected result: ---------------- i should get the attribute value into a variable by using dom functions $map = $objDOM->getElementsByTagName("map")->item(0); $mapsize = $map->getAttribute('size'); Actual result: -------------- getting the above warning message and Fatal error: Call to a member function getAttribute() on a non-object -- Edit bug report at http://bugs.php.net/?id=37010&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37010&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37010&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37010&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37010&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37010&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37010&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37010&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37010&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37010&r=support Expected behavior: http://bugs.php.net/fix.php?id=37010&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37010&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37010&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37010&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37010&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37010&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37010&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37010&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37010&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37010&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37010&r=mysqlcfg

« previous php.bugs (#95433) next »