#24474 [Opn->Fbk]: get_element_by_id doesn`t work

From: Date: Thu, 03 Jul 2003 09:57:26 +0000
Subject: #24474 [Opn->Fbk]: get_element_by_id doesn`t work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-43164@lists.php.net to get a copy of this message
 ID:               24474
 Updated by:       derick@php.net
 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] derick@php.net

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



Thread (20 messages)

« previous php.bugs (#43164) next »