ID: 24474 User updated by: grest at interia dot pl Reported By: grest at interia dot pl Status: Bogus Bug Type: DOM XML related Operating System: WinXp PHP Version: 4.3.2 New Comment:
I`ve checked this out, and this is not the reason. Previous Comments: ------------------------------------------------------------------------ [2003-07-03 05:26:34] [EMAIL PROTECTED] Your xml is not valid: # /usr/bin/xmllint filmy.xml filmy.xml:5: error: Input is not proper UTF-8, indicate encoding ! <TITLE>13 Duchów</TITLE> ^ filmy.xml:5: error: Bytes: 0xF3 0x77 0x3C 0x2F <TITLE>13 Duchów</TITLE> ^ ------------------------------------------------------------------------ [2003-07-03 05:18:31] grest at interia dot pl del.php <?php $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); $filename = "filmy.xsl"; $xmldoc = domxml_open_file("filmy.xml"); $xsldoc = domxml_xslt_stylesheet_file($filename); $result = $xsldoc->process($xmldoc); print $xsldoc->result_dump_mem($result); ?> filmy.xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE LIST SYSTEM "filmy.dtd"> <LIST> <MOVIE ID="m20036271138360"> <TITLE>13 Duchów</TITLE> <ORGTITLE/><LOC>Grzesiek HDD</LOC> <INFO/> </MOVIE> <MOVIE ID="m20036271138361"> <TITLE>8 kobiet</TITLE> <ORGTITLE/> <LOC>Grzesiek HDD</LOC> <INFO/> </MOVIE> </LIST> simply.html: <html> <body> <form action="del.php" method="post" style="margin:0px"> <input type="hidden" name="deltitle" size="1" value="m20036271138360"><input type="image" name="Delete" src="del.gif"> </form> </body> </html> I`m sure that 'deltitle' and $fid variable are correct "connected" (sorry for my English :P ), but get_element_by_id doesn`t find the node in XML file(filmy.xml) ------------------------------------------------------------------------ [2003-07-03 04:57:25] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24474 -- Edit this bug report at http://bugs.php.net/?id=24474&edit=1