ID: 24474
Updated by: [EMAIL PROTECTED]
Reported By: grest at interia dot pl
-Status: Open
+Status: Feedback
Bug Type: DOM XML related
Operating System: WinXp
PHP Version: 4.3.2
New Comment:
Please provide a FULL self-contained script which should work when we
copy and paste it into a file and run it with php <filename>. This is
useles.
Previous Comments:
------------------------------------------------------------------------
[2003-07-03 04:50:30] grest at interia dot pl
$fileName = "filmy.xml";
$fid = $HTTP_POST_VARS['deltitle'];
if(!$dom = domxml_open_file($fileName)) {
echo "Error while parsing the document\n";
exit;
}
$node = $dom->get_element_by_id($fid);
$parent = $node->parent_node();
$delnode = $parent->remove_child($node);
$dom->dump_file("filmy.xml", true);
------------------------------------------------------------------------
[2003-07-03 04:36:10] [EMAIL PROTECTED]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2003-07-03 04:33:10] grest at interia dot pl
Description:
------------
get_element_by_id doesn`t work and always returns NULL.
Reproduce code:
---------------
MY DTD:
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT LIST (MOVIE+)>
<!ELEMENT MOVIE (TITLE, ORGTITLE, LOC, INFO)>
<!ATTLIST MOVIE
ID ID #REQUIRED
>
<!ELEMENT TITLE (#PCDATA)>
<!ELEMENT ORGTITLE (#PCDATA)>
<!ELEMENT LOC (#PCDATA)>
<!ELEMENT INFO (#PCDATA)>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24474&edit=1